SCIENCE & MATHS

Vector Calculator

Sum, difference, dot and cross products, the angle between two vectors, the projection of one onto the other, unit vectors and the scalar triple product.

The resulting vector or scalar with its magnitude, the dot product and the angle in degrees and radians, the projection and the perpendicular rejection, and whether the pair is parallel or perpendicular.

Example: (1, 2, 3) · (4, 5, 6) = 32, so the angle is 12.93°; their cross product is (−3, 6, −3), magnitude 7.348 and perpendicular to both.

v0.1.0 · last reviewed 22 September 2026
Loading the workspace…
BUILT TO BE UNDERSTOOD

Two products,
and the rest follows.

What the dot product measures, why the cross product only exists in three dimensions, and what is deliberately left out.

The dot product

The dot product is Σ aᵢbᵢ, and it is the one that carries the geometry: cos θ = a·b ÷ (|a||b|) gives the angle, its sign alone tells you whether that angle is acute, obtuse or right, and dividing by |b| gives the length of a along b. From there the projection of a onto b and the rejection — what is left, perpendicular to b by construction — split any vector into a component along a direction and a component across it, which is most of what vectors get used for. It works in any number of dimensions, so the page does not restrict it to two or three.

The cross product

The cross product is different: it is only defined in three dimensions (and seven, which nobody asks for). Its magnitude is the area of the parallelogram the two vectors span, its direction is perpendicular to both by the right-hand rule, and reversing the order negates it. Asking for one in 2-D is refused rather than quietly padded with a zero — the usual 2-D substitute, a₁b₂ − a₂b₁, is a scalar, not a vector, and the difference matters. The scalar triple product a·(b × c) follows from both: it is the signed volume of the parallelepiped, zero when the three vectors are coplanar.

Limits

Plain Euclidean vectors in double precision, components taken as given in an orthonormal basis. No units are attached, so nothing here knows whether you are adding metres or newtons; no coordinate transform, no basis change and no curvilinear system. Normalising a very short vector loses precision, because the magnitude is a square root of a sum of small squares. Whether two vectors count as parallel or perpendicular is decided against a tolerance you set and can see, not a hidden one. Nothing leaves the browser; the same four anonymous usage counts as the rest of the site apply.

SOURCES

  • Dot product Σ aᵢbᵢ, cos θ = a·b ÷ (|a||b|), cross product in three dimensions only, projection (a·b ÷ |b|²)b; orthonormal Euclidean components, no units attached

Last reviewed 22 September 2026. How results are checked: How we verify.