Skip to main content
math

Dot Product Calculator

Calculate the dot product (scalar product) of two vectors in 2D or 3D space.

Reviewed by Chase FloiedUpdated

This free online dot product calculator provides instant results with no signup required. All calculations run directly in your browser — your data is never sent to a server. Enter your values below and see results update in real time as you type. Perfect for everyday calculations, homework, or professional use.

For 2D, set z to 0

For 2D, set z to 0

How to Use This Calculator

1

Enter your input values

Fill in all required input fields for the Dot Product Calculator. Most fields include unit selectors so you can work in your preferred unit system — metric or imperial, whichever matches your problem.

2

Review your inputs

Double-check that all values are correct and that you have selected the right units for each field. Incorrect units are the most common source of calculation errors and can produce results that are off by factors of 2, 10, or more.

3

Read the results

The Dot Product Calculator instantly computes the output and displays results with units clearly labeled. All calculations happen in your browser — no loading time and no data sent to a server.

4

Explore parameter sensitivity

Try adjusting individual input values to see how the output changes. This is a quick and effective way to develop intuition about how different parameters influence the result and to identify which inputs have the largest effect.

Formula Reference

Dot Product Calculator Formula

See calculator inputs for the governing equation

Variables: All variables and their units are labeled in the calculator interface above. Input fields accept values in multiple unit systems — select your preferred unit from the dropdown next to each field.

When to Use This Calculator

  • Use the Dot Product Calculator when you need a quick mathematical result without writing out all the steps manually, saving time on repetitive calculations.
  • Use it to verify hand calculations on tests or assignments and catch arithmetic mistakes.
  • Use it when teaching or explaining mathematical concepts to others, demonstrating how changing inputs affects the result.
  • Use it to explore the behavior of mathematical functions across a range of inputs.

About This Calculator

The Dot Product Calculator is a free mathematical calculation tool for students, educators, and professionals who need quick, reliable results. Calculate the dot product (scalar product) of two vectors in 2D or 3D space. The underlying algorithms implement well-established mathematical formulas and numerical methods. Results are computed instantly in the browser. This tool is useful for learning, verification of hand calculations, and rapid exploration of mathematical relationships. All computation happens locally — no data is sent to a server.

About Dot Product Calculator

The dot product (also called the scalar product or inner product) is a fundamental operation that takes two vectors and produces a single scalar value. It is computed by multiplying corresponding components and summing the results: A . B = x1*x2 + y1*y2 + z1*z2. The dot product reveals the angle between two vectors and is used to determine orthogonality (perpendicularity), project one vector onto another, and compute work done by a force. This calculator computes the dot product, the cosine of the angle between the vectors, and the angle itself in degrees. The dot product is essential in physics (work, energy), computer graphics (lighting, shading), machine learning (similarity measures), and geometry.

The Math Behind It

The dot product A . B = |A| × |B| × cos(θ), where θ is the angle between the two vectors. This geometric definition shows that the dot product measures how much one vector points in the direction of another. When the dot product is zero, the vectors are perpendicular (orthogonal). When positive, the angle is acute; when negative, the angle is obtuse. The algebraic definition is the sum of component products: A . B = x1*x2 + y1*y2 + z1*z2. Key properties: commutative (A . B = B . A), distributive over addition (A . (B + C) = A . B + A . C), and scalar multiplicative ((kA) . B = k(A . B)). The dot product of a vector with itself gives the square of its magnitude: A . A = |A|^2. The projection of A onto B is (A . B / |B|^2) × B. In n-dimensional space, the dot product generalizes naturally to the sum of n component products. In physics, work is defined as the dot product of force and displacement: W = F . d.

Formula Reference

Dot Product

A · B = x₁x₂ + y₁y₂ + z₁z₂

Variables: A = (x₁, y₁, z₁), B = (x₂, y₂, z₂)

Angle Between Vectors

cos(θ) = (A · B) / (|A| × |B|)

Variables: |A|, |B| = magnitudes of vectors A and B

Worked Examples

Example 1: 3D dot product

Find the dot product of A = (1, 2, 3) and B = (4, 5, 6)

Step 1:Multiply components: 1×4 = 4, 2×5 = 10, 3×6 = 18
Step 2:Sum: 4 + 10 + 18 = 32
Step 3:|A| = √(1+4+9) = √14 ≈ 3.742
Step 4:|B| = √(16+25+36) = √77 ≈ 8.775
Step 5:cos(θ) = 32 / (3.742 × 8.775) ≈ 0.9746
Step 6:θ = arccos(0.9746) ≈ 12.93°

A · B = 32, angle ≈ 12.93°

Common Mistakes & Tips

  • !Confusing the dot product with the cross product (dot gives a scalar, cross gives a vector).
  • !Adding the components instead of multiplying them.
  • !Forgetting that the dot product is zero for perpendicular vectors, not parallel vectors.
  • !Using the wrong formula for the angle (forgetting to divide by magnitudes).

Related Concepts

Used in These Calculators

Calculators that build on or apply the concepts from this page:

Frequently Asked Questions

When is the dot product zero?

When the vectors are perpendicular (orthogonal) to each other.

Can the dot product be negative?

Yes. A negative dot product means the angle between the vectors is greater than 90 degrees (obtuse).

What is the difference between dot product and cross product?

The dot product produces a scalar measuring alignment. The cross product produces a vector perpendicular to both inputs, measuring the area of the parallelogram they span.