Dot Product Calculator

Find the scalar product of two vectors.

How it is calculated

Fill in the x, y and z components of two vectors, a and b. The tool multiplies matching components and adds the three products: a·b = ax·bx + ay·by + az·bz. The answer is one number, rounded to two decimals; it has no direction. The components can be any real numbers, negative or decimal, and the unit of the result is the product of the two input units (newtons times metres give joules, for example). All six boxes must be filled, otherwise there is no result; for 2D vectors enter 0 for both z components. Reading the sign: positive means the vectors point broadly the same way, negative broadly opposite, and exactly zero means they are perpendicular. The tool does not return the angle or the vector lengths.

Worked example

Take a = (1, 2, 3) and b = (4, −5, 6). Multiply the x parts: 1 × 4 = 4. The y parts: 2 × (−5) = −10. The z parts: 3 × 6 = 18. Add them: 4 − 10 + 18 = 12.00. The result is positive, so the two vectors point broadly in the same direction, even though their y components have opposite signs.

Try this example →

Common mistakes

  • Leaving a z box empty for 2D vectors. A missing component gives no result; type 0 instead.
  • Dropping a minus sign. With by = −5 the y product is −10, and entering 5 would turn the answer from 12 into 32.
  • Expecting a vector as the answer, as with the cross product. The dot product is a single number.
  • Concluding that vectors are parallel when the result is large. Large only means long vectors; the same pair can be nearly perpendicular and still give a small value, and zero tells perpendicular, not parallel.
  • Entering two components in a different order for each vector, such as (x, y, z) for a but (z, y, x) for b. Both must use the same order.

About this calculator

This calculator computes the dot product of two 3D vectors, a·b = a₁b₁ + a₂b₂ + a₃b₃, a scalar (single-number) result that also equals |a||b|cos(θ), the product of the vectors' magnitudes and the cosine of the angle between them.

It's a core operation in physics for calculating work done by a force (W = F·d) and in 3D graphics and game development for lighting calculations and determining whether two vectors point in a similar direction (a positive dot product) or opposite directions (negative). Engineering and linear algebra students use it to check vector orthogonality — a dot product of exactly zero means the vectors are perpendicular.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    Although the tool returns only one number, you can get lengths and an angle with it. Enter the same vector in both columns and the result is its squared length. For the example vectors (1, 2, 3) and (4, -5, 6) that gives 14 and 77, and 12 divided by the square root of 14 times 77 is the cosine of the angle, about 68.6 degrees. Do you use dot products for angles, projections or work?

Popular calculators

All Calculators