Audited 29 Jul 2026·Last updated 31 Jul 2026·5 citations·Tier 1·0 uses

Cross Product Calculator (Vector Product)

Compute a x b for two 3D vectors: the resulting vector, its magnitude, the parallelogram and triangle areas, and the angle between the vectors.

Cross Product Calculator

Dimension
First component of vector a.
Ignored in 2-D mode.
First component of vector b. Order matters: a x b = −(b x a).
Ignored in 2-D mode.
a x b
(-3, 6, -3)
The cross product, perpendicular to both inputs, with direction given by the right-hand rule. Swapping a and b flips every component.
|a x b|
7.3485
Parallelogram area
7.3485
Triangle area
3.6742
Angle between a and b
7.4758°
Relationship
Oblique — the vectors are neither parallel nor perpendicular, so they span a genuine parallelogram
x component
-3
y component
6
z component
-3

Background.

This cross product calculator multiplies two three-dimensional vectors and returns the vector a x b together with everything that follows from it: the magnitude, the area of the parallelogram the two vectors span, the area of the triangle that is half of it, the angle between them, and a plain-language verdict on whether they are parallel, perpendicular or somewhere between. A second mode computes the two-dimensional scalar cross product, which is the signed area of the same parallelogram flattened into the plane.

The cross product is the odd one out among vector operations. Adding two vectors gives a vector, and the dot product of two vectors gives a number, but the cross product gives a vector that points out of the plane the two inputs live in — perpendicular to both of them at once. Its length is |a| times |b| times the sine of the angle between them, which is exactly the area of the parallelogram with a and b as adjacent sides. So one calculation answers two very different-looking questions: which direction is perpendicular to these two, and how much area do they enclose. That double life is why the cross product turns up in torque, in angular momentum, in the magnetic force on a moving charge, in surface normals for computer graphics, and in the test for whether three points are collinear.

The direction obeys the right-hand rule, and the order of the operands is part of the question rather than a detail. Because a x b = −(b x a), swapping the two vectors flips the result end to end. The standard check is i x j = k: the unit vector along x crossed with the unit vector along y gives the unit vector along z, not its negative. This calculator uses that right-handed convention throughout, and the test suite pins it with exactly that example.

A cross product only exists in three dimensions — and, as a mathematical curiosity, in seven. There is genuinely no such operation on plane vectors that returns another plane vector. What people call the two-dimensional cross product, and what this page's second mode computes, is the single number aₓbᵧ − aᵧbₓ. That is the z-component you would get by embedding your plane in space at z = 0, and it is also exactly the determinant of the 2 by 2 matrix formed from the two vectors. Its absolute value is the parallelogram's area, and its sign tells you the turn direction: positive means b lies counter-clockwise from a, negative means clockwise. That sign is what makes it the workhorse of computational geometry, where it decides which side of a line a point falls on.

One piece of arithmetic on this page deserves calling out, because it is where cross product calculators most often go quietly wrong. The obvious way to recover the angle is to invert sin θ = |a x b| / (|a| |b|). But arcsin only returns values up to 90°, so it cannot tell an angle apart from its supplement — it reports both 45° and 135° as 45°. This calculator instead computes atan2 of the cross product magnitude against the dot product, which uses the sign of the dot product to place the angle in the correct half and stays well behaved over the whole range from 0° to 180°. That also makes the two degenerate cases work properly: parallel vectors come back as 0° and antiparallel vectors as 180°, even though both have a cross product of exactly zero and are indistinguishable by magnitude alone.

One input is refused rather than answered. If either vector is the zero vector, the cross product is legitimately the zero vector — but the angle between a direction and a vector that has no direction does not exist. Since this page reports an angle, it declines that input and explains why, instead of returning a plausible-looking number for some outputs and a meaningless one for another.

What is cross product calculator?

The cross product of two vectors a = (aₓ, aᵧ, a_z) and b = (bₓ, bᵧ, b_z) in three-dimensional space is the vector a x b = (aᵧb_z − a_zbᵧ, a_zbₓ − aₓb_z, aₓbᵧ − aᵧbₓ). It is perpendicular to both a and b, with its direction fixed by the right-hand rule, and it satisfies |a x b| = |a| |b| sin θ where θ is the angle between the two vectors. That magnitude equals the area of the parallelogram having a and b as adjacent sides, so half of it is the area of the triangle with vertices at the origin, a and b. The operation is anticommutative — a x b = −(b x a) — and distributive over addition, but it is not associative. It vanishes exactly when the two vectors are collinear, which makes a x b = 0 the standard test for parallelism. Unlike the dot product, which is defined in every dimension and returns a scalar, the cross product as a vector-valued operation exists only in three dimensions and in seven. The so-called two-dimensional cross product is the scalar aₓbᵧ − aᵧbₓ, which is the determinant of the 2 by 2 matrix whose rows are the two vectors, equal to the signed area of the parallelogram they span: positive when b is counter-clockwise from a and negative when it is clockwise.

How to use this calculator.

  1. Choose 3-D if you want the full vector a x b, or 2-D if your vectors lie in a plane and you want the scalar signed area.
  2. Enter the three components of vector a, then the three components of vector b. In 2-D mode the z boxes are ignored.
  3. Mind the order — a x b and b x a differ by a sign, so enter the vectors in the order your problem states them.
  4. Read the cross product vector at the top. It is perpendicular to both of your inputs; you can check that by taking its dot product with each one and getting zero.
  5. Read the magnitude for the length of that vector, which is also the area of the parallelogram your two vectors span.
  6. Read the triangle area if you need the area of the triangle formed by the origin and the two vector tips — it is exactly half the parallelogram.
  7. Read the angle for the separation between the two vectors, anywhere from 0° to 180°.
  8. If the relationship says parallel or antiparallel, the cross product is the zero vector and your two vectors lie on the same line through the origin.

The formula.

a × b = (aᵧb_z − a_zbᵧ , a_zbₓ − aₓb_z , aₓbᵧ − aᵧbₓ)

Each component of the cross product is a 2 by 2 determinant built from the other two coordinates: the x component is aᵧb_z − a_zbᵧ, the y component is a_zbₓ − aₓb_z, and the z component is aₓbᵧ − aᵧbₓ. Written that way the pattern is a cyclic rotation of the indices x → y → z → x, which is the easiest form to remember and the one implemented here. Some textbooks, OpenStax among them, print the middle component with a minus sign pulled outside the bracket as −(aₓb_z − a_zbₓ); that is the same number, just written differently, and both give +6 for the worked example. The magnitude of the result is |a| |b| sin θ, and since |a| |b| sin θ is base times height for the parallelogram with a and b as adjacent sides, the magnitude is that parallelogram's area; the triangle spanned by the same two vectors is half of it. The angle is recovered as atan2 of the cross product magnitude against the dot product a·b rather than as arcsin of the magnitude ratio. That choice matters: arcsin is restricted to −90° through 90° and cannot separate θ from 180° − θ, so it reports the genuinely obtuse pair a = (1, 0, 0), b = (−1, 1, 0) as 45° when the answer is 135°. atan2 uses the sign of the dot product to place the angle in the right half and behaves correctly at both endpoints, returning 0° for parallel vectors and 180° for antiparallel ones even though both have a cross product of exactly zero. Rounding happens once, at the very end. All arithmetic runs at 40 significant digits and results are rounded to 10 decimal places only at the return boundary. The parallel / perpendicular / oblique verdict is classified on the unrounded ratios |a x b| / (|a||b|) and (a·b) / (|a||b|) against a tolerance of 1e-12, so no displayed value takes part in the classification.

A worked example.

Example

Take a = (2, 3, 4) and b = (5, 6, 7). The x component of the cross product is aᵧb_z − a_zbᵧ = 3×7 − 4×6 = 21 − 24 = −3. The y component is a_zbₓ − aₓb_z = 4×5 − 2×7 = 20 − 14 = 6. The z component is aₓbᵧ − aᵧbₓ = 2×6 − 3×5 = 12 − 15 = −3. So a x b = (−3, 6, −3). Check that it really is perpendicular to both inputs: a·(a x b) = 2(−3) + 3(6) + 4(−3) = −6 + 18 − 12 = 0, and b·(a x b) = 5(−3) + 6(6) + 7(−3) = −15 + 36 − 21 = 0. Its magnitude is √(9 + 36 + 9) = √54 = 3√6 ≈ 7.3484692283, which is both the length of the cross product and the area of the parallelogram spanned by a and b; the triangle with vertices at the origin, a and b therefore has area ≈ 3.6742346142. For the angle, the dot product is 2×5 + 3×6 + 4×7 = 10 + 18 + 28 = 56, so θ = atan2(7.3484692283, 56) = 0.1304770961 radians ≈ 7.4757906324°. That is a very small angle, which is the geometric reason the cross product came out short: two nearly-parallel vectors enclose very little area. It can be cross-checked the other way round — |a| = √29 and |b| = √110, so |a||b| = √3190 ≈ 56.480085, and sin θ = 7.3484692283 / 56.480085 ≈ 0.1301069, whose arcsine is 7.4757906° as well. Switching the same numbers into 2-D mode ignores the z components and returns the single scalar 2×6 − 3×5 = −3, whose absolute value 3 is the area of the plane parallelogram on (2, 3) and (5, 6), giving a triangle area of 1.5 — which agrees with the shoelace formula for the triangle (0,0), (2,3), (5,6).

mode3d
bx5
ax2
by6
ay3
bz7
az4

Frequently asked questions.

How do you calculate the cross product of two vectors?
Each component of a x b is a small 2 by 2 determinant made from the other two coordinates: the x component is aᵧb_z − a_zbᵧ, the y component is a_zbₓ − aₓb_z, and the z component is aₓbᵧ − aᵧbₓ. The indices rotate cyclically x → y → z → x, which is the pattern worth memorising. For a = (2, 3, 4) and b = (5, 6, 7) this gives (21 − 24, 20 − 14, 12 − 15) = (−3, 6, −3). You can always check your answer by taking the dot product of the result with each original vector — both must come out exactly zero.
What is the difference between the dot product and the cross product?
The dot product takes two vectors and returns a single number, proportional to the cosine of the angle between them; it measures how much the vectors point the same way, and it is zero when they are perpendicular. The cross product takes two vectors and returns a vector, with length proportional to the sine of the angle; it measures how much they fail to point the same way, and it is zero when they are parallel. The dot product works in any number of dimensions. The cross product, as a vector-valued operation, only exists in three dimensions and in seven.
Why does the cross product only work in 3D?
Because the requirement is very strong: you need an operation on two vectors that returns another vector in the same space, perpendicular to both, with a magnitude equal to the area they span, and which behaves properly under rotation. In two dimensions there is no direction perpendicular to two independent plane vectors that stays inside the plane. In three dimensions there is exactly one such direction up to sign, which is why the cross product exists and is essentially unique there. It is a genuinely surprising fact that seven dimensions is the only other case where such a product exists.
What is the 2D cross product?
It is the scalar aₓbᵧ − aᵧbₓ — the z-component you would get by embedding the plane in space at z = 0, and also exactly the determinant of the 2 by 2 matrix whose rows are the two vectors. Its absolute value is the area of the parallelogram they span, and its sign tells you the turn direction: positive means b lies counter-clockwise from a, negative means clockwise. That sign is why the quantity is central to computational geometry, where it decides which side of a line a point lies on and whether three points turn left or right. This calculator's 2-D mode computes it.
How do I find the area of a triangle from two vectors?
Take the cross product of the two vectors that form two of its sides, find the magnitude, and halve it. The cross product's magnitude is the area of the full parallelogram those two vectors span, and the triangle is exactly half of that parallelogram. In the worked example the magnitude is √54 ≈ 7.3485, so the triangle with vertices at the origin, (2, 3, 4) and (5, 6, 7) has area ≈ 3.6742. If your triangle has vertices P, Q and R rather than starting at the origin, use the vectors Q − P and R − P.
What does it mean if the cross product is zero?
It means the two vectors are collinear — parallel or antiparallel, lying on the same line through the origin. There is no parallelogram to speak of, so the area is zero, and there is no unique perpendicular direction to point at. This makes a x b = 0 the standard test for parallelism, and by extension the standard test for whether three points are collinear: form two vectors from one of them to the other two and cross them. Note that a zero cross product on its own cannot tell you whether the vectors point the same way or opposite ways — you need the dot product's sign for that, which is why this calculator reports 0° in one case and 180° in the other.
Does the order of the vectors matter?
Yes, and it changes the answer. The cross product is anticommutative: a x b = −(b x a). Swapping the two vectors flips every component of the result, so the vector points the opposite way, though its length and the angle between the inputs are unchanged. This is why the right-hand rule is stated as a rule about order — curl the fingers of your right hand from the first vector toward the second and your thumb points along the result. The check that fixes the convention is i x j = k, not −k.
Why does the angle come out as 135° and not 45° for some vectors?
Because this page computes the angle with atan2 rather than arcsin, and the two disagree for every obtuse angle. Take a = (1, 0, 0) and b = (−1, 1, 0): the cross product has magnitude 1 and |a||b| = √2, so sin θ = 1/√2 and arcsin returns 45°. But the dot product is −1, which is negative, so the vectors point broadly away from each other and the true angle is 135°. arcsin only ever returns values from −90° to 90° and cannot tell an angle from its supplement. Using atan2 of the cross product magnitude against the dot product resolves it, and it also gives the correct 0° and 180° at the two degenerate ends where the cross product is zero either way.

In this category

Embed

Quanta Pro

Paid features are coming later.

  • All 977 calculators remain free
  • No billing is enabled
Coming soon