Cross Product CalculatorFree online math calculator — instant results, no sign-up

Calculate the cross product of two three-dimensional vectors.

Inputs

x
0
y0
z1

Sign in to save results and favorites.

About the Cross Product Calculator

The Cross Product Calculator calculates the vector perpendicular to two three-dimensional vectors by taking the first vector crossed with the second. Enter their x, y, and z components to obtain the three components of the cross product. With the default vectors (1, 0, 0) and (0, 1, 0), the result is (0, 0, 1).

First x
The x-component of the first vector, defaulting to 1, is expressed in the same units as its y- and z-components or is unitless for a purely numerical vector.
First y
The y-component of the first vector, defaulting to 0, is expressed in the same units as its x- and z-components or is unitless for a purely numerical vector.
First z
The z-component of the first vector, defaulting to 0, is expressed in the same units as its x- and y-components or is unitless for a purely numerical vector.
Second x
The x-component of the second vector, defaulting to 0, is expressed in the same units as its y- and z-components or is unitless for a purely numerical vector.
Second y
The y-component of the second vector, defaulting to 1, is expressed in the same units as its x- and z-components or is unitless for a purely numerical vector.
Second z
The z-component of the second vector, defaulting to 0, is expressed in the same units as its x- and y-components or is unitless for a purely numerical vector.

Formula and method

For a = (a_x, a_y, a_z) and b = (b_x, b_y, b_z), a × b = (x, y, z), where x = a_y b_z − a_z b_y, y = a_z b_x − a_x b_z, and z = a_x b_y − a_y b_x. With the defaults: x = 0·0 − 0·1 = 0; y = 0·0 − 1·0 = 0; z = 1·1 − 0·0 = 1.
  • aThe first input vector.
  • bThe second input vector.
  • a_x, a_y, a_zThe First x, First y, and First z input values, respectively.
  • b_x, b_y, b_zThe Second x, Second y, and Second z input values, respectively.
  • ×The cross product operator, with operand order determining the result's direction.
  • x, y, zThe three output components of the vector a × b.
  • ·Ordinary multiplication between scalar components in the worked calculation.

The calculator forms each output component by subtracting two products of input components. It uses the y- and z-components for x, the z- and x-components for y, and the x- and y-components for z. The order of these subtractions implements the right-hand-rule orientation for the first vector crossed with the second; the result is not normalized.

Worked example

These are the calculator's starting values and the results it actually produces for them.

Inputs

  • First x1
  • First y0
  • First z0
  • Second x0
  • Second y1
  • Second z0

Results

  • x0
  • y0
  • z1

How to use the Cross Product Calculator

  1. 1Enter the first vector in First x, First y, and First z; for the default example, use 1, 0, and 0.
  2. 2Enter the second vector in Second x, Second y, and Second z; for the default example, use 0, 1, and 0.
  3. 3Check that both vectors use the same Cartesian coordinate frame and that component units are consistent within each vector.
  4. 4Calculate the cross product in the order first vector × second vector.
  5. 5Read the output rows: the default inputs produce x = 0, y = 0, and z = 1, giving the vector (0, 0, 1).

Reading your result

The x, y, and z output rows are signed components of the resulting vector along the corresponding coordinate axes, not three separate magnitudes. For the defaults, x = 0 and y = 0 indicate no component along those axes, while z = 1 indicates a vector pointing along the positive z-axis. A nonzero result is perpendicular to both inputs, with direction given by the right-hand rule. Its magnitude equals the area of the parallelogram spanned by the input vectors. Output units are the product of the two vectors' units; unitless inputs give a unitless result.

Limitations

This calculator uses the standard three-dimensional cross product in a shared, right-handed orthonormal Cartesian coordinate frame. It does not convert units or coordinate systems, and it does not automatically produce a unit normal. Parallel or antiparallel inputs, or either input being the zero vector, produce a zero vector with no defined direction. Finite-precision arithmetic may introduce rounding error, especially when nearly parallel vectors cause subtraction of nearly equal products.

Common questions

Why do the default vectors produce a positive z-component?+

The first vector (1, 0, 0) points along positive x, and the second (0, 1, 0) points along positive y. The right-hand rule gives positive z, and the formula confirms z = 1·1 − 0·0 = 1 while x and y are both 0.

What happens if I swap the first and second vectors?+

The cross product changes sign: b × a = −(a × b). Swapping the default vectors therefore changes (0, 0, 1) to (0, 0, −1), without changing its magnitude.

What does a cross product of (0, 0, 0) mean?+

If both input vectors are nonzero, they are parallel or antiparallel. A zero result also occurs if either input is the zero vector. In either case, the inputs do not define a unique normal direction through their cross product.

Is the output always a unit normal vector?+

No. Its magnitude depends on the lengths of the input vectors and the angle between them. To obtain a unit normal, divide a nonzero result by its magnitude, √(x² + y² + z²); the default result (0, 0, 1) already has magnitude 1.

Does the calculator save my information?+

Calculations run in your browser. While signed in, inputs and results are automatically recorded in account history; saving a result creates a separate saved record.

You might also like

Results are estimates for informational purposes and are not financial, medical or legal advice.