➗
✓ Editorially reviewed by Derek Giordano, Founder & Editor · BA Business Marketing

Vector Calculator

Dot Product, Cross Product, Magnitude & Angle

Updated October 2026

For a = (3, 4, 0) and b = (1, 2, 2): |a| = 5, |b| = 3, the dot product is 3 + 8 + 0 = 11, so the angle between them is arccos(11 ÷ 15) = 42.8°. The cross product a × b = (8, −6, 2) is perpendicular to both.
🧮
500+ calculators, no signup required
Finance · Health · Math · Science · Business
nnng.com

What This Vector Calculator Does

Enter two vectors by their components and this tool computes the operations you actually need: the dot product, the cross product, each vector's magnitude, the angle between them, and their sum. It works for 2D vectors (leave the z components at zero) and full 3D vectors. Every result updates from the same set of inputs, so you can see how the pieces relate.

Vectors are the language of physics and engineering — force, velocity, displacement, and fields are all vectors. The two products below answer two different geometric questions, and mixing them up is one of the most common sources of confusion, so it's worth being clear about what each one means.

Dot Product vs Cross Product

The dot product (A · B) returns a single number — a scalar. It measures how much two vectors point in the same direction. When it's zero, the vectors are perpendicular; when it's large and positive, they're closely aligned. It's the basis for finding the angle between vectors and for projecting one vector onto another.

The cross product (A × B) returns a new vector, perpendicular to both inputs, and only exists in three dimensions. Its magnitude equals the area of the parallelogram the two vectors span, and its direction follows the right-hand rule. It's how you find a normal vector to a plane, compute torque, or get the axis of rotation.

Finding the Angle Between Vectors

The angle comes straight from the dot product: cos θ = (A · B) / (|A| |B|). This calculator does that step for you and reports the angle in degrees. A result of 90° confirms the vectors are orthogonal; 0° means they're parallel and pointing the same way; 180° means they point in opposite directions. If you work with slopes and lines in 2D, the slope calculator is a useful companion.

Magnitude and the Pythagorean Connection

A vector's magnitude — its length — is just the Pythagorean theorem extended to as many dimensions as you have: the square root of the sum of the squared components. For (3, 4, 0) that's √(9 + 16) = 5. The magnitude turns a direction-and-size object back into a plain length, which is what you need when a problem asks "how fast" or "how far" rather than "which way."

A Fully Worked Example

Suppose you are working with two force vectors in three dimensions: A = (2, 3, 6) and B = (1, 2, 2). Walking through every operation by hand shows exactly what the calculator does internally. Start with the magnitudes, since several later steps depend on them. The magnitude of A is √(2² + 3² + 6²) = √(4 + 9 + 36) = √49 = 7. The magnitude of B is √(1² + 2² + 2²) = √(1 + 4 + 4) = √9 = 3. Clean whole numbers here are a coincidence of the example, but they make the arithmetic easy to follow.

Next, the dot product. Multiply matching components and add: (2)(1) + (3)(2) + (6)(2) = 2 + 6 + 12 = 20. Because the dot product is positive and fairly large relative to the magnitudes, you already know the two vectors point in broadly similar directions. To turn that intuition into a precise angle, divide the dot product by the product of the magnitudes: 20 ÷ (7 × 3) = 20 ÷ 21 ≈ 0.952. The angle is the inverse cosine of that value, cos⁻¹(0.952) ≈ 17.75°. The vectors are nearly aligned, which matches the large positive dot product.

The cross product takes a little more care because each component is a small determinant. The x component is (3)(2) − (6)(2) = 6 − 12 = −6. The y component is (6)(1) − (2)(2) = 6 − 4 = 2. The z component is (2)(2) − (3)(1) = 4 − 3 = 1. So A × B = (−6, 2, 1). As a check, this result vector should be perpendicular to both inputs — and indeed its dot product with A is (−6)(2) + (2)(3) + (1)(6) = −12 + 6 + 6 = 0, confirming perpendicularity. The magnitude of the cross product, √((−6)² + 2² + 1²) = √(36 + 4 + 1) = √41 ≈ 6.40, equals the area of the parallelogram the two vectors span. Entering these same vectors into the calculator returns exactly these figures instantly.

Where Vector Operations Show Up

These calculations are not abstract exercises — each maps to a concrete physical or computational task. The dot product is the workhorse of physics and graphics. When you compute the work done by a force, you take the dot product of the force vector and the displacement vector, because only the component of force along the direction of motion does any work. In 3D graphics and game engines, the dot product between a surface normal and a light direction determines how brightly a surface is lit, which is the basis of nearly all real-time shading.

The cross product answers a different family of questions, all involving rotation or orientation. Torque — the twisting force on a wrench or a bolt — is the cross product of the lever-arm vector and the applied force, which is why pushing perpendicular to a wrench handle is far more effective than pushing along it. In computer graphics, the cross product of two edges of a triangle produces the surface normal, the perpendicular direction a polygon faces, which feeds directly back into those lighting calculations. Navigation and robotics use cross products to compute axes of rotation when reorienting a body in space.

A common source of error worth flagging is order and orientation. The dot product is commutative — A · B equals B · A — so order never matters there. The cross product is the opposite: A × B points in exactly the opposite direction to B × A. Reversing the order flips the sign of every component. If a calculation involving torque, rotation, or a surface normal comes out pointing the wrong way, a swapped cross-product order is the first thing to check. The other frequent slip is mixing 2D and 3D carelessly; when working in a plane, keep the z components at zero rather than dropping them, so the cross product still has a well-defined direction to point along. For related plane-geometry work, the slope calculator handles two-dimensional lines directly.

What is the difference between the dot product and the cross product?
The dot product returns a single number (a scalar) that measures how aligned two vectors are — it’s zero when they’re perpendicular. The cross product returns a new vector perpendicular to both inputs, and only exists in 3D. Use the dot product for angles and projections, and the cross product for normals, torque, and areas.
How do I find the angle between two vectors?
Use the formula cos θ = (A · B) ÷ (|A| × |B|), then take the inverse cosine. This calculator does it automatically and reports the angle in degrees. A 90° result means the vectors are perpendicular, 0° means parallel and aligned, and 180° means they point in opposite directions.
Can this calculator handle 2D vectors?
Yes. For 2D vectors, just leave the z component at zero for both vectors. The dot product, magnitude, angle, and sum all work normally. The cross product of two 2D vectors points purely in the z direction, which the calculator reports.
What does the magnitude of a vector mean?
Magnitude is the vector’s length — the square root of the sum of its squared components, which is the Pythagorean theorem extended to multiple dimensions. For the vector (3, 4, 0), the magnitude is √(9 + 16) = 5. It converts a direction-and-size vector back into a plain length.
Why does the cross product only work in 3D?
The cross product produces a vector perpendicular to two input vectors, and a unique perpendicular direction only exists in three dimensions. In 2D there’s no third axis for the result to point along, and in higher dimensions there are infinitely many perpendicular directions, so the classic cross product is defined specifically for 3D.
What does it mean when the dot product is zero?
A dot product of zero means the two vectors are perpendicular (orthogonal) — they meet at a 90° angle. This is one of the most useful facts in vector math: testing whether the dot product equals zero is the quickest way to check if two vectors, lines, or directions are at right angles.

How to Use This Calculator

  1. Enter the components of Vector A — Input the x, y, and z components of your first vector. For a 2D problem, leave z at zero.
  2. Enter the components of Vector B — Input the x, y, and z components of your second vector, using the same convention.
  3. Read the products and angle — The calculator computes the dot product, cross product, the angle between the vectors, and both magnitudes simultaneously.
  4. Check the geometric meaning — Use the angle to confirm whether vectors are perpendicular (90°) or parallel (0°), and the cross-product magnitude for the parallelogram area.

Tips and Best Practices

Leave both z components at zero to work entirely in 2D — every operation except the cross product behaves exactly as it would on paper.

If the dot product comes out to zero, your vectors are perpendicular. It’s the fastest orthogonality check there is.

The cross product’s magnitude equals the area of the parallelogram the two vectors form — handy for geometry problems, not just physics.

Remember the cross product is not commutative: A × B points opposite to B × A. Order matters, so keep your vectors in the intended sequence.

📚 Sources & References
  1. [1] MIT OpenCourseWare ""Vectors and Matrices — Dot and Cross Products."" MIT 18.02 Multivariable Calculus. ocw.mit.edu
  2. [2] Khan Academy ""Vector dot and cross products."" Khan Academy. khanacademy.org
  3. [3] Weisstein, Eric W. ""Cross Product."" Wolfram MathWorld. mathworld.wolfram.com
  4. [4] National Institute of Standards and Technology ""Guide for the Use of the International System of Units."" NIST. nist.gov
✅ Editorial Standards — Every calculator is built from peer-reviewed formulas and official data sources, editorially reviewed for accuracy, and updated regularly. Read our full methodology · About the author