Want a Custom tool for Yourself?

Need a Custom Tool? We build custom tools that can save hours per employee per day.

Dot Product Calculator

Calculate the dot product of two vectors from their components. Useful for projections, angles between vectors, and work calculations in physics.

Enter the Details

Calculate the dot product of two vectors using the calculator below.

Vector a

Vector b:


Result will appear here...


Last updated: April 16, 2026

Created by: Eon Tools Dev Team

Reviewed by: Okan Atalay



What this calculator does

The dot product is one of the two ways you can multiply two vectors, and it answers a specific question: how much do these two arrows point the same way? Its result is a single number, not another vector. This computes it, in 2D or 3D.

Enter the two vectors and it returns their dot product. It runs right here in the browser.

Using the calculator

  1. Choose 2D or 3D.
  2. Enter the components of vector a and vector b.
  3. Press Calculate.

It returns the dot product, a single number. Reset clears the boxes.

What the dot product is

The dot product takes two vectors and gives back a plain number, a scalar. That is worth stressing, because it is the thing that most often trips people up: the dot product of two arrows is not an arrow, it is just a value. For that reason it is also called the scalar product.

What that number captures is alignment. When two vectors point roughly the same way, their dot product is large and positive. When they are at odds, it is negative. And when they are exactly at right angles, it is zero. In one number, it tells you how much the two vectors agree in direction.

The formula, two ways

There are two formulas for the dot product, and they always give the same answer. The first is how the tool computes it, by components:

a · b = axbx + ayby ( + azbz )

Multiply the matching components and add them up. The second formula is what the dot product means:

a · b = |a| × |b| × cos(θ)

where |a| and |b| are the two lengths and θ is the angle between them. Since the cosine is what carries the angle, this is the version that explains why the dot product measures alignment.

What the answer tells you

Because cos(θ) is positive for small angles, zero at a right angle, and negative for wide angles, the sign of the dot product reads straight off as the relationship between the two vectors:

  • Positive: the vectors point in broadly the same direction, an acute angle between them.
  • Zero: the vectors are exactly perpendicular, at 90 degrees. This is the single most useful fact about the dot product: a dot product of zero is the test for a right angle.
  • Negative: the vectors point in broadly opposite directions, an obtuse angle between them.

Worked examples

Aligned. Take a = (2, 3) and b = (4, 1). The dot product is 2 × 4 + 3 × 1 = 8 + 3 = 11. Positive, so the two vectors make an acute angle, leaning the same general way.

Perpendicular. Take a = (2, 3) and b = (3, -2). The dot product is 2 × 3 + 3 × (-2) = 6 − 6 = 0. Zero means these two are at exactly a right angle, which you can confirm by sketching them.

What it is used for

The dot product does a lot of quiet work. Rearranging the geometric formula gives the angle between two vectors, since cos(θ) = a · b divided by the two lengths. It gives the projection of one vector onto another, the shadow one casts along the other. It is the quickest perpendicular test there is, just check for zero. And in physics it defines work, the force times the distance moved in the force's direction. Its partner, the other way to multiply vectors, is the cross product, which gives a vector instead of a number.

Questions people ask

What is the dot product?

A way of multiplying two vectors to get a single number that measures how much they point in the same direction. It is also called the scalar product.

Is the dot product a vector or a number?

A number, a scalar. This is the main difference from the cross product, which gives a vector.

What does the sign of the dot product mean?

Positive means the vectors point broadly the same way, negative means broadly opposite, and zero means they are perpendicular.

How do I check if two vectors are perpendicular?

Take their dot product. If it is zero, they are at a right angle.

What is the difference between the dot product and the cross product?

The dot product gives a number measuring alignment. The cross product gives a vector perpendicular to both and works only in 3D.

References

A note on where this comes from. The dot product, or scalar product, multiplies two vectors to yield a scalar equal to the product of their lengths and the cosine of the angle between them. The name "scalar product" was coined by William Kingdon Clifford in 1877 to stress that its result is a scalar, while the modern dot notation is due to Gibbs and Heaviside. For further reading, see Dot product.

  1. The dot product, a · b = axbx + ayby + azbz = |a||b|cos(θ), measuring the alignment of two vectors.
  2. W. K. Clifford, who named it the scalar product (1877) to emphasise that the result is a scalar, not a vector.


Okan Atalay

Okan Atalay is a results driven senior operations manager and a graduate of Industrial Engineering from Bilkent University. With over 22 years of experience in textile manufacturing and integrated operations, he has led large scale business process improvements and strategic planning initiatives. Currently, he serves as a top mathematics expert for a global ed tech platform, where he applies his analytical expertise to solve complex mathematical problems. At Eon Tools, he reviews converter and maths tools.