← All Tools

Vector Calculator

2D and 3D vector arithmetic — dot product, cross product, magnitude, normalize, angle, projection, and linear interpolation. Everything runs locally in your browser.

Vectors

x
y
z
x
y
z

Operations

2D preview

A in accent, B in warning, A + B (parallelogram diagonal) in success. Switch to 2D mode to see the visualization.

About

Cross product is only defined in 3D (and 7D, but no one cares). In 2D mode the “cross” result is the scalar ax*by − ay*bx, which is the signed area of the parallelogram and the z-component of the 3D cross. The angle between two vectors uses acos(a·b / (|a||b|)) and is always between 0 and π (0° and 180°). Projection of A onto B is (a·b / b·b) · b; the rejection is a − proj_b(a). Lerp is component-wise a + t(b − a) — clamp t to [0,1] for interpolation, allow outside for extrapolation.