Skip to content
M2TOOLKIT

Vector Calculator

Enter one or two vectors to get magnitude, dot and cross products, the angle between them and more.

  • Free
  • No sign-up
  • Nothing is sent or stored

Result

|A|
5
Unit vector Â
(0.6, 0.8, 0)
|B|
2.23606798
A + B
(4, 4, 2)
A − B
(2, 4, -2)
A · B (dot product)
3
A × B (cross product)
(8, -6, -4)
Angle between A and B
74.435193°
1.2991392 rad
Projection of A onto B
(0.6, 0, 1.2)

The calculation happens instantly in your browser. The numbers you enter are not sent to our servers or saved.

How to use the Vector Calculator

  1. Type vector A as comma-separated numbers, e.g. 3, 4, 0.
  2. Optionally type vector B with the same number of components.
  3. Read every result at once.

What does this tool do?

Vectors have both size and direction. The magnitude is the length of the arrow, the dot product measures how much two vectors point the same way, and the cross product gives a third vector perpendicular to both.

The angle between vectors comes from the dot product formula cos θ = (A · B) ÷ (|A||B|). 2D vectors are treated as 3D with z = 0 for the cross product.

Why use it?

  • All common operations in one view.
  • Works in 2D, 3D and higher dimensions.
  • Angle shown in degrees and radians.

The formula

|A| = √(a₁² + a₂² + a₃²)
A · B = a₁b₁ + a₂b₂ + a₃b₃
A × B = (a₂b₃ − a₃b₂, a₃b₁ − a₁b₃, a₁b₂ − a₂b₁)

Privacy

The calculation happens instantly in your browser. The numbers you enter are not sent to our servers or saved. There's no account to create and nothing to install.

Frequently asked questions

Does the cross product work in 2D?

It's defined for 3D vectors. For 2D input, the calculator sets z = 0, so the result points straight along the z-axis.

Last reviewed by the M2Toolkit team.

Other tools people use alongside the vector calculator.