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
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.
- 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.
- 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.
- 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.
- Read the result vector and its components. To confirm it is right, take its dot product with each input; both should be zero.
- 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.
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.
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.
Frequently asked questions.
Is there an easy way to remember the cross product formula?
Which way does a × b point?
How do I find the area of a triangle from its three corner points?
How do I get the equation of a plane through three points?
What does a zero cross product tell me?
Why is the angle shown as 135° when my textbook method gives 45°?
What does the sign of the 2-D cross product mean?
How is the cross product used to calculate torque?
Why is there no ordinary cross product in two or four dimensions?
Does it matter how I group a triple cross product?
References& sources.
- [1]OpenStax, Calculus Volume 3, §2.4 "The Cross Product" — component definition u×v = (u₂v₃ − u₃v₂)i − (u₁v₃ − u₃v₁)j + (u₁v₂ − u₂v₁)k, the theorem that the parallelogram area is ‖u×v‖, the relation ‖u×v‖ = ‖u‖‖v‖ sin θ, and the collinearity test u×v = 0. Retrieved 2026-07-29; open access.
- [2]Wolfram MathWorld, "Cross Product" — independent statement of the same component expansion, written with the y-component's sign folded into the bracket, plus |u×v| = |u||v| sin θ. Used as the second authority on the component formula. Retrieved 2026-07-29; open access.
- [3]OpenStax, Calculus Volume 3, §2.3 "The Dot Product" — u·v = ‖u‖‖v‖ cos θ, the relation this page uses to place the angle in the correct half of the 0°–180° range via atan2. Retrieved 2026-07-29; open access.
- [4]MIT OpenCourseWare, 18.06 Linear Algebra (Spring 2010), G. Strang — determinants and their interpretation as signed area and volume, which is what the 2-D mode of this page returns. Retrieved 2026-07-29; open access.
- [5]Strang, G. (2016). Introduction to Linear Algebra, 5th ed., Wellesley–Cambridge Press. §5.3 "Cramer's Rule, Inverses, and Volumes" — the determinant as the area of a parallelogram and the volume of a box. Print reference — cited bibliographically, with no URL.
How this page was produced
- Published by
- Quanta Calculator
- Overseen by
- Daniel, Quanta Calculator Researcher
- 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