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
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.
- 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.
- Enter the three components of vector a, then the three components of vector b. In 2-D mode the z boxes are ignored.
- 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.
- 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.
- Read the magnitude for the length of that vector, which is also the area of the parallelogram your two vectors span.
- 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.
- Read the angle for the separation between the two vectors, anywhere from 0° to 180°.
- 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.
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.
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).
Frequently asked questions.
How do you calculate the cross product of two vectors?
What is the difference between the dot product and the cross product?
Why does the cross product only work in 3D?
What is the 2D cross product?
How do I find the area of a triangle from two vectors?
What does it mean if the cross product is zero?
Does the order of the vectors matter?
Why does the angle come out as 135° and not 45° for some vectors?
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.
In this category
Embed
Quanta Pro
Paid features are coming later.
- All 977 calculators remain free
- No billing is enabled