→ Vector Calculator
Add, subtract, dot product, cross product, magnitude, and angle between 3D vectors.
Vector A
Vector B
About the Vector Calculator
This calculator runs entirely in your browser. It performs the most common 3D vector operations: addition, subtraction, dot (scalar) product, cross (vector) product, magnitude, and the angle between two vectors. Enter the components of vectors A and B, pick an operation, and the result appears instantly.
Vector formulas
- Addition —
A + B = (Ax+Bx, Ay+By, Az+Bz). - Subtraction —
A − B = (Ax−Bx, Ay−By, Az−Bz). - Dot product —
A · B = Ax·Bx + Ay·By + Az·Bz. A scalar; zero when A and B are perpendicular. - Cross product —
A × B = (Ay·Bz−Az·By, Az·Bx−Ax·Bz, Ax·By−Ay·Bx). A vector perpendicular to both A and B; zero when parallel. - Magnitude —
|A| = √(Ax² + Ay² + Az²). - Angle —
θ = arccos((A · B) / (|A|·|B|)), in degrees. Requires both vectors to be non-zero.
How to use the calculator
- Enter the x, y, z components of vectors A and B (use 0 for 2D vectors).
- Click the button for the operation you need.
- The result appears below the buttons. Each button can be pressed repeatedly.
Frequently asked questions
Can I do 2D vectors? Yes. Leave the z field as 0 (or blank) and all operations work correctly — the cross product of two 2D vectors returns a vector along the z-axis.
Why does the angle require non-zero vectors? The angle formula divides by the product of magnitudes. If either is zero, the angle is undefined and an error is shown.
What units is the angle in? Degrees, rounded to 2 decimal places, in the range 0° to 180°.
Is my input stored or uploaded? No. Everything happens in your browser. Your input is never sent to a server.