Cross Product Calculator

Compute the cross product of two 3D vectors, its magnitude, the dot product and the angle between them.

Math and PercentUpdated 2026-11-184 min read
Cross Product Calculator
Cross product a x b
...
Magnitude of the cross product...
Angle between the vectors...
x component...
y component...
z component...
Dot product a · b...

What it does

The cross product is a way to multiply two vectors in three dimensions and get another vector back. The dot product gives a single number, but the cross product gives a direction as well as a size. That direction is at right angles to both of the vectors you put in, which is why the operation turns up whenever a normal to a plane or an axis of rotation is needed.

The component formula looks awkward at first, but it follows a simple pattern. The x component uses the y and z components of both vectors, the y component uses z and x, and the z component uses x and y. A compact way to remember it is to write the unit vectors i, j and k in the first row of a three by three determinant, the components of the first vector in the second row and the components of the second vector in the third row.

The size of the result has a clear geometric meaning. It equals the product of the two lengths times the sine of the angle between them, and that is exactly the area of the parallelogram with the two vectors as sides. When the vectors are parallel the sine is zero, so the cross product vanishes. When they are at right angles the sine is one and the magnitude is as large as it can be.

Direction comes from the right hand rule. Point the fingers of your right hand along the first vector, curl them toward the second through the smaller angle, and your thumb gives the direction of the cross product. This is why reversing the order of the vectors changes the sign, and it is the reason torque and magnetic force are written with a cross product rather than a plain product.

This page takes six components, returns the three components of the cross product, its magnitude, the dot product and the angle between the vectors. It works only in three dimensions. It does not attempt vector products in four dimensions or the seven dimensional case, and it assumes ordinary Euclidean geometry.

How to use

  1. Enter the x, y and z components of the first vector a.
  2. Enter the x, y and z components of the second vector b.
  3. Read the cross product in the first result row, written as an ordered triple.
  4. Check the three individual components if you need them separately.
  5. Use the magnitude as the area of the parallelogram spanned by the vectors.
  6. Use the angle and dot product rows to see how far the vectors are from being perpendicular.

Formula

a x b = (ay bz - az by, az bx - ax bz, ax by - ay bx). The magnitude is |a x b| = |a| |b| sin(theta), and the dot product is a · b = |a| |b| cos(theta).
a
The first vector, with components ax, ay and az.
b
The second vector, with components bx, by and bz.
a x b
The cross product, a vector perpendicular to both a and b.
|a x b|
Magnitude of the cross product, equal to the spanned parallelogram area.
theta
Angle between a and b, from 0 to 180 degrees.
a · b
Dot product, ax bx + ay by + az bz, a scalar.

The middle component carries a minus sign when written as ay bz - az by, az bx - ax bz, ax by - ay bx, and the determinant form builds that sign in automatically. The cross product is anti-commutative, so b x a = -(a x b). Both vectors must have at least one nonzero component, otherwise the angle is not defined.

Worked example

Example: (1, 1, 0) cross (0, 1, 1)

Defaults: a = (1, 1, 0) and b = (0, 1, 1).

  1. x component: ay bz - az by = 1 x 1 - 0 x 1 = 1.
  2. y component: az bx - ax bz = 0 x 0 - 1 x 1 = -1.
  3. z component: ax by - ay bx = 1 x 1 - 1 x 0 = 1.
  4. The cross product is (1, -1, 1).
  5. Magnitude: square root of (1 + 1 + 1) = square root of 3 = 1.732.
  6. Dot product: 1 x 0 + 1 x 1 + 0 x 1 = 1, and both lengths are square root of 2, so the cosine of the angle is 1 / 2.
  7. The tool shows (1, -1, 1), 1.732, an angle of 60.0 degrees and a dot product of 1.

Reference table

Cross products of standard unit vectors and two worked pairs
VectorsCross productMagnitude
i x j(0, 0, 1)1
j x k(1, 0, 0)1
k x i(0, 1, 0)1
(1, 1, 0) x (0, 1, 1)(1, -1, 1)1.732
(2, 0, 0) x (0, 3, 4)(0, -8, 6)10

Limits

  • The cross product is defined for three dimensional vectors, so this page cannot handle a two dimensional pair directly.
  • The angle assumes ordinary Euclidean geometry and is reported in degrees between 0 and 180.
  • A zero vector makes the angle undefined, so both vectors need at least one nonzero component.
  • Very large components are rejected to keep the arithmetic and the displayed result readable.

Common mistakes

  • Mixing up the middle component sign, which should be az bx - ax bz.
  • Assuming the cross product is commutative, when swapping the inputs reverses the sign.
  • Using the magnitude as a vector, when it is a single number and the area of the parallelogram.
  • Expecting a nonzero cross product from parallel vectors, whose sine term is zero.
  • Forgetting that the angle follows from the dot product and the two lengths, not from the cross product alone.

Try it yourself

Quick checks. Answers sit tucked under each question.

What is (2, 0, 0) x (0, 3, 4)?

The components are (0 x 4 - 0 x 3, 0 x 0 - 2 x 4, 2 x 3 - 0 x 0) = (0, -8, 6), and the magnitude is the square root of (64 + 36) = 10.

Find the angle between (1, 0, 0) and (0, 1, 0).

The dot product is zero and both lengths are 1, so the cosine is 0 and the angle is 90.0 degrees. The cross product is (0, 0, 1).

How do i x j and j x i compare?

i x j = (0, 0, 1) while j x i = (0, 0, -1). They have the same magnitude but opposite directions because the cross product is anti-commutative.

Questions

What does the cross product actually give?

A vector that is perpendicular to both input vectors. Its length equals the area of the parallelogram that the two vectors span.

Why does the order of the vectors matter?

Swapping them reverses the direction of the result. This is the right hand rule in action, and in algebra it means b x a = -(a x b).

Can I take the cross product of two dimensional vectors?

Not directly. Embed them in three dimensions with a zero z component, and the result will point along the z axis.

What happens if the vectors are parallel?

The cross product is the zero vector, because the sine of the angle between them is zero and there is no unique perpendicular direction.

How is the angle calculated here?

From the dot product and the two lengths, using cos(theta) = (a · b) / (|a| |b|), then converting to degrees.

Where is the cross product used in physics?

In torque as r x F, in magnetic force as q v x B, and whenever a vector normal to a plane or an axis of rotation is needed.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.