Free online tools

Vector Dot and Cross Product Calculator

Enter two vectors with matching dimensions. The calculator gives their dot product, cross product and the unsigned angle between them.

Enter your values

Enter two or three numbers in order, separated by spaces or commas.

This tool processes your input in your browser.

Result

Find the dot product

Multiply corresponding coordinates and add the products. For A = (1, 2, 3) and B = (2, 0, 1), their dot product is 1 × 2 + 2 × 0 + 3 × 1 = 5. Two nonzero vectors with dot product zero meet at a right angle.

Find a perpendicular vector with the cross product

In three dimensions, A × B points perpendicular to both vectors according to the right-hand rule. Its magnitude equals the area of their parallelogram. For the example, the cross product is (2, 5, −4). For two-dimensional inputs, the calculator treats both z coordinates as zero and reports the signed z result.

Interpret the angle

The unsigned angle ranges from 0° to 180°. The ratio of the dot product to the product of the vector lengths is the cosine of the angle. The calculator uses the cross magnitude and dot product together to retain precision when two directions are nearly parallel.

Frequently asked questions

What if a vector is zero?

Its dot product and cross product with any vector are zero. It has no direction, so the angle between the vectors is undefined.

What changes if I swap A and B?

The dot product and unsigned angle stay the same. The cross product changes sign because its direction depends on the order.

Can one vector have two coordinates and the other three?

Enter matching dimensions. To treat a two-dimensional vector as lying in the xy plane, add an explicit zero for its third coordinate.