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

Cross Product Calculator (Vector Product)

Cross two 3-D vectors to get a × b, its length, the parallelogram and triangle areas and the angle between them, or find the signed 2-D cross product.

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 vector a × b, perpendicular to both inputs with its direction set by the right-hand rule; in 2-D mode it is (0, 0, signed scalar).
|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.

Two arrows leave the same point: an edge of a roof panel and the rafter beside it, a spanner handle and the push on its end, two sides of a triangle in a 3-D model. The cross product turns that pair into a third arrow standing straight up out of the plane they share, and the length of that new arrow is the area of the parallelogram the first two outline. One calculation, two answers: a direction perpendicular to both, and an area.

That combination is why the operation appears in so many places. Torque is the cross product of the lever arm with the force. The magnetic force on a moving charge is the charge times its velocity crossed with the magnetic field. Graphics programs cross two edges of every triangle to find which way the surface faces before shading it, and surveyors and engineers use the same step to get the area of a sloping triangular surface from the coordinates of its corners.

The result depends on order. Crossing a with b gives the exact opposite of crossing b with a, and the right-hand rule decides which is which: curl the fingers of your right hand from the first vector toward the second and your thumb points along a × b. The unit vectors along x and y, crossed in that order, give the unit vector along z, not its negative.

Alongside the vector you get its length, the parallelogram and triangle areas, the angle between the inputs, and a verdict on whether they are parallel, antiparallel, perpendicular or neither. A 2-D mode handles vectors in a plane, where the cross product shrinks to a single signed number, the determinant aₓbᵧ − aᵧbₓ. Its sign tells you whether the second vector turns counter-clockwise or clockwise from the first, the test at the heart of most computational geometry.

What is cross product calculator?

For a = (aₓ, aᵧ, a_z) and b = (bₓ, bᵧ, b_z), the cross product is the vector a × b = (aᵧb_z − a_zbᵧ, a_zbₓ − aₓb_z, aₓbᵧ − aᵧbₓ). It is perpendicular to both a and b, its direction follows the right-hand rule, and its length is |a||b| sin θ, where θ is the angle between the inputs. Because base times height of the parallelogram with sides a and b is exactly |a||b| sin θ, that length is the parallelogram's area. The product is anticommutative, so a × b = −(b × a); it distributes over addition; it is not associative; and it is the zero vector precisely when a and b lie along the same line. As an operation that turns two vectors into a third vector perpendicular to both, it exists only in three dimensions and, less usefully, in seven. In the plane the closest equivalent is the scalar aₓbᵧ − aᵧbₓ, the z component you get by placing both vectors at z = 0.

How to use this calculator.

  1. Choose 3-D for the full vector product, or 2-D if both vectors lie in a plane and you want the signed scalar. In 2-D mode the z boxes are ignored.
  2. Enter the components of a, then of b, in the order your problem gives them. Swapping the vectors reverses the direction of the answer, though not its length.
  3. If your vectors start at points other than the origin, subtract first: for a triangle with corners P, Q and R, enter Q − P as a and R − P as b.
  4. Read the result vector and its components. To confirm it is right, take its dot product with each input; both should be zero.
  5. Use the magnitude or parallelogram area for the area spanned by a and b, the triangle area for half of it, and the angle for their separation from 0° to 180°. Neither vector may be all zeros, since a zero vector has no direction to measure an angle from.

The formula.

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

The easiest way to remember the components is as a 3 × 3 determinant with the unit vectors i, j and k in the top row, a in the middle row and b in the bottom row. Expanding along the top row gives i(aᵧb_z − a_zbᵧ) − j(aₓb_z − a_zbₓ) + k(aₓbᵧ − aᵧbₓ). Folding the minus sign into the middle bracket gives a_zbₓ − aₓb_z, and then all three components follow one cyclic pattern, x → y → z → x: each one is a 2 × 2 determinant built from the other two coordinates. OpenStax prints the middle term with the sign outside; MathWorld folds it in; the numbers are identical. The length obeys |a × b| = |a||b| sin θ, and a useful companion identity is |a × b|² = |a|²|b|² − (a·b)², which lets you check a cross product using only lengths and the dot product. The angle is worked out as θ = atan2(|a × b|, a·b). The obvious alternative, arcsin of |a × b| ÷ (|a||b|), can only return angles up to 90°, so it cannot tell 45° from 135°; arccos of the dot-product ratio gets the range right but loses precision for nearly parallel vectors, where the cosine sits very close to 1. Feeding both the sine-like and cosine-like quantities to atan2 avoids both problems. The parallel, antiparallel, perpendicular or oblique verdict compares |a × b| ÷ (|a||b|) and a·b ÷ (|a||b|) with a tolerance of 10⁻¹², so floating-point dust does not turn exactly perpendicular vectors into oblique ones. Components may be any numbers up to 10¹² in size. In 2-D mode both z components are set to zero, so the x and y components of the result vanish and the z component carries the signed answer; the angle shown is still the unsigned angle between the vectors.

A worked example.

Example

Cross a = (2, 3, 4) with b = (5, 6, 7). The x component 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 × b = (-3, 6, -3). Dotting the result with each input confirms it is perpendicular to both: 2(−3) + 3(6) + 4(−3) = 0 and 5(−3) + 6(6) + 7(−3) = 0. Its length is √(9 + 36 + 9) = √54 = 7.3485, which is also the area of the parallelogram on a and b; the triangle with corners at the origin, a and b has half that, 3.6742. For the angle, a·b = 10 + 18 + 28 = 56, and atan2(7.3485, 56) = 7.4758°. The identity |a × b|² = |a|²|b|² − (a·b)² checks everything at once: |a|² = 29, |b|² = 110, and 29 × 110 − 56² = 3,190 − 3,136 = 54, exactly the square of the length found above. The small angle explains the small area. The two vectors are each several units long, and |a||b| = √3,190 = 56.4801, yet they enclose only 7.3485 square units because they point in almost the same direction. Their parallelogram is a long, thin sliver, and sin θ = 0.1301 measures how thin.

mode3d
bx5
ax2
by6
ay3
bz7
az4

Frequently asked questions.

Is there an easy way to remember the cross product formula?
Write a 3 × 3 determinant with i, j, k on top, a's components in the middle row and b's on the bottom, then expand along the top row. Or remember the cycle x → y → z → x: the x component uses only y and z (aᵧb_z − a_zbᵧ), and the other two follow by shifting every letter one step along the cycle.
Which way does a × b point?
Perpendicular to both inputs, on the side given by the right-hand rule: point your fingers along a, curl them toward b, and your thumb shows the direction. The standard check is i × j = k, j × k = i and k × i = j. Reverse the order and every sign flips, so (5, 6, 7) × (2, 3, 4) gives (3, -6, 3), the opposite of the worked example.
How do I find the area of a triangle from its three corner points?
Subtract one corner from the other two to get two edge vectors, cross them, and halve the length. For corners P = (1, 0, 0), Q = (0, 2, 0) and R = (0, 0, 3), the edges are Q − P = (−1, 2, 0) and R − P = (−1, 0, 3). Their cross product is (6, 3, 2), with length 7, so the triangle's area is 3.5.
How do I get the equation of a plane through three points?
The cross product of two edge vectors is a normal to the plane. In the triangle example the normal is (6, 3, 2), so the plane has the form 6x + 3y + 2z = d. Substituting any of the points, say P = (1, 0, 0), gives d = 6, and the plane is 6x + 3y + 2z = 6. Q and R satisfy it too.
What does a zero cross product tell me?
That the two vectors lie along one line through the origin, so they enclose no area and have no unique perpendicular. Zero alone cannot say whether they point the same way or opposite ways; the dot product's sign decides that. Crossing (1, 2, 3) with (−2, −4, −6) gives (0, 0, 0), a negative dot product, an angle of 180° and the verdict antiparallel.
Why is the angle shown as 135° when my textbook method gives 45°?
Inverting sin θ = |a × b| ÷ (|a||b|) with arcsin can never return more than 90°. For a = (1, 0, 0) and b = (−1, 1, 0), the cross product has length 1 and |a||b| = √2, so arcsin gives 45°. But the dot product is −1, meaning the vectors open wider than a right angle, and the true angle is 135°, which atan2 finds.
What does the sign of the 2-D cross product mean?
It gives the turn direction from a to b. Positive means b lies counter-clockwise from a, negative clockwise, and zero means they are collinear. For (2, 3) and (5, 6), 2 × 6 − 3 × 5 = −3, so the turn is clockwise and the parallelogram area is 3. The angle output stays unsigned at 6.1155°, so read direction from the sign, not the angle.
How is the cross product used to calculate torque?
Torque is τ = r × F, the lever arm from the pivot to where the force acts, crossed with the force. A 0.3 m spanner along x with a 50 N push along y gives r × F = (0, 0, 15): 15 N·m about the z axis. Push along the handle instead and the cross product is zero, which matches the experience that pulling along a spanner turns nothing.
Why is there no ordinary cross product in two or four dimensions?
In a plane there is no direction perpendicular to two independent vectors that stays inside the plane, so the best you can do is the scalar determinant. In higher dimensions there are too many perpendicular directions to pick one naturally. A product with all the cross product's key properties turns out to exist only in three and seven dimensions.
Does it matter how I group a triple cross product?
Yes, because the cross product is not associative. With unit vectors, i × (i × j) = i × k = −j, while (i × i) × j = 0 × j = 0. To expand a × (b × c), use the identity a × (b × c) = b(a·c) − c(a·b). A related quantity, a·(b × c), gives the volume of the box with edges a, b and c, up to sign.

How this page was produced

Published by
Quanta Calculator
Primary sources
5 cited below
Method
a × b = (aᵧb_z − a_zbᵧ , a_zbₓ − aₓb_z , aₓbᵧ − aᵧbₓ)
Published
Last verified

Built with AI assistance and verified by automated tests against the cited sources — every worked example on this page is computed by the same code that runs the calculator. How we build and check calculators.

In this category

Embed

Quanta Pro

Paid features are coming later.

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