Vector Calculator | Dot, Cross, Angle & Magnitude
Start typing to discover tools…
2D and 3D Vector Tool

Vector Calculator

Calculate vector addition, subtraction, dot and cross products, magnitudes, angles, distances, unit vectors and projections with instant results.

Instant calculations 2D and 3D support Mobile friendly

3D Vector Calculator

For 2D vectors, enter 0 for each z component

Ready

Vector A

A = ⟨aₓ, aᵧ, aᵤ⟩
x
y
z
A = ⟨aₓ, aᵧ, aᵤ⟩

Vector B

B = ⟨bₓ, bᵧ, bᵤ⟩
x
y
z
B = ⟨bₓ, bᵧ, bᵤ⟩

Main Vector Operations

Addition
⟨0, 0, 0⟩

A + B

Subtraction
⟨0, 0, 0⟩

A − B

Dot Product
0

A · B

Cross Product
⟨0, 0, 0⟩

A × B

Vector Measurements

Length & Angle
Magnitude of A 0
Magnitude of B 0
Distance A to B 0
Angle in Degrees
Angle in Radians 0 rad

Direction & Projection

Advanced
Unit Vector A ⟨0, 0, 0⟩
Unit Vector B ⟨0, 0, 0⟩
Projection A onto B ⟨0, 0, 0⟩
Scalar Projection 0

Try an example

What Is a Vector Calculator?

A vector calculator performs mathematical operations on quantities that have both magnitude and direction. Vectors are commonly represented by x, y and z coordinate components.

This tool supports two-dimensional and three-dimensional calculations. For a 2D vector, simply enter zero as the z component.

You can calculate addition, subtraction, dot products, cross products, vector lengths, angles, distances, unit vectors and projections from one calculator.

Complete vector operations Add and subtract vectors and calculate dot and cross products.
Magnitude and direction Find vector lengths, unit vectors and the angle between two vectors.
Vector projection Calculate the vector and scalar projection of A onto B.
Simple Process

How the Vector Calculator Works

Complete several vector calculations in three simple steps.

01

Enter Vector A

Add the x, y and z components of the first vector. Enter zero for z when using a 2D vector.

02

Enter Vector B

Add the coordinate components of the second vector using positive, negative or decimal values.

03

View All Results

Calculate vector operations, measurements, directions and projections instantly.

Formula Guide

Vector Formulas Explained

These formulas are used to calculate relationships between two-dimensional and three-dimensional vectors.

Addition and Subtraction

Add or subtract corresponding vector components.

A ± B = ⟨a₁ ± b₁, a₂ ± b₂, a₃ ± b₃⟩

Dot Product

Multiply matching components and add the products.

A · B = a₁b₁ + a₂b₂ + a₃b₃

Cross Product

The cross product produces a vector perpendicular to both original vectors.

A × B = ⟨a₂b₃−a₃b₂, a₃b₁−a₁b₃, a₁b₂−a₂b₁⟩

Angle Between Vectors

The angle is calculated using the dot product and vector magnitudes.

θ = cos⁻¹[(A · B) / (|A||B|)]

Unit Vector

A unit vector has the same direction as the original vector but a magnitude of one.

 = A / |A|

Vector Projection

Projection measures the portion of Vector A acting in the direction of Vector B.

projᵦ(A) = [(A · B) / |B|²]B
Worked Examples

Vector Calculation Examples

Review common vector inputs and their calculated results.

Vector A Vector B A + B A · B A × B
⟨1, 2, 3⟩ ⟨4, 5, 6⟩ ⟨5, 7, 9⟩ 32 ⟨−3, 6, −3⟩
⟨3, 4, 0⟩ ⟨2, −1, 5⟩ ⟨5, 3, 5⟩ 2 ⟨20, −15, −11⟩
⟨2, 0, 0⟩ ⟨0, 3, 0⟩ ⟨2, 3, 0⟩ 0 ⟨0, 0, 6⟩
⟨−2, 5, 1⟩ ⟨3, 0, −4⟩ ⟨1, 5, −3⟩ −10 ⟨−20, −5, −15⟩
Helpful Answers

Vector Calculator FAQs

Find answers to common questions about vectors, products, magnitudes and projections.

What is a vector?

A vector is a mathematical quantity with both magnitude and direction. It may be represented using coordinate components such as ⟨x, y⟩ or ⟨x, y, z⟩.

Can this calculator handle 2D vectors?

Yes. Enter zero for the z component of both vectors to perform calculations using two-dimensional vectors.

How do I calculate vector magnitude?

Square each component, add the squared values and take the square root. For ⟨x, y, z⟩, the magnitude is √(x² + y² + z²).

What does the dot product represent?

The dot product is a scalar value that indicates how strongly two vectors point in the same direction. A dot product of zero means nonzero vectors are perpendicular.

What does the cross product represent?

The cross product produces a vector perpendicular to both original vectors. It is commonly used in geometry, physics and three-dimensional graphics.

Why is the angle sometimes undefined?

The angle is undefined when either input is the zero vector because a zero vector has no defined direction.

What is a unit vector?

A unit vector has a magnitude of exactly one while retaining the direction of its original vector.

What is vector projection?

Vector projection determines how much of one vector acts in the direction of another vector. Projection onto the zero vector is undefined.

Calculate 2D and 3D Vectors Instantly

Enter two vectors above to calculate their operations, lengths, angle, unit directions and projections.

Open Calculator
Result copied successfully.