Vector Calculator
Calculate vector instantly in your browser.
Loading calculator…
What this tool does
Calculate vector instantly in your browser. Three-component vectors; enter 0 for the z component to work in 2D. A dot product of zero means the vectors are perpendicular.
How to use the Vector Calculator
- Enter or select vector a: x component.
- Enter or select vector a: y component.
- Enter or select vector a: z component.
- Enter or select vector b: x component.
- Enter or select vector b: y component.
- Enter or select vector b: z component.
- Read the calculated result; change any measurement to compare alternatives.
Formula
Magnitude |A| = √(ax² + ay² + az²); dot product A·B = ax·bx + ay·by + az·bz = |A||B|cos θ; cross product A×B = (ay·bz − az·by, az·bx − ax·bz, ax·by − ay·bx), perpendicular to both vectors.
- ax
- Vector A: x component
- ay
- Vector A: y component
- az
- Vector A: z component
- bx
- Vector B: x component
- by
- Vector B: y component
- bz
- Vector B: z component
Three-component vectors; enter 0 for the z component to work in 2D. A dot product of zero means the vectors are perpendicular.
Worked example
For vector calculator, the following measurements illustrate the exact method: Vector A: x component: 3; Vector A: y component: 4; Vector A: z component: 0; Vector B: x component: 1; Vector B: y component: -2; Vector B: z component: 5.
Inputs
- Vector A: x component3
- Vector A: y component4
- Vector A: z component0
- Vector B: x component1
- Vector B: y component-2
- Vector B: z component5
Result
- A + B(4, 2, 5)
- A − B(2, 6, -5)
- Magnitude of A5
- Magnitude of B5.48
- Dot product A · B-5
- Cross product A × B(20, -15, -10)
- Angle between A and B (degrees)100.519734891
Results explained
- A + B
- A + B from the formula above. Three-component vectors; enter 0 for the z component to work in 2D. A dot product of zero means the vectors are perpendicular.
- A − B
- A − B from the formula above. Three-component vectors; enter 0 for the z component to work in 2D. A dot product of zero means the vectors are perpendicular.
- Magnitude of A
- Magnitude of A from the formula above. Three-component vectors; enter 0 for the z component to work in 2D. A dot product of zero means the vectors are perpendicular.
- Magnitude of B
- Magnitude of B from the formula above. Three-component vectors; enter 0 for the z component to work in 2D. A dot product of zero means the vectors are perpendicular.
- Dot product A · B
- Dot product A · B from the formula above. Three-component vectors; enter 0 for the z component to work in 2D. A dot product of zero means the vectors are perpendicular.
- Cross product A × B
- Cross product A × B from the formula above. Three-component vectors; enter 0 for the z component to work in 2D. A dot product of zero means the vectors are perpendicular.
- Angle between A and B (degrees)
- Angle between A and B (degrees) from the formula above. Three-component vectors; enter 0 for the z component to work in 2D. A dot product of zero means the vectors are perpendicular.
Frequently asked questions
Magnitude |A| = √(ax² + ay² + az²); dot product A·B = ax·bx + ay·by + az·bz = |A||B|cos θ; cross product A×B = (ay·bz − az·by, az·bx − ax·bz, ax·by − ay·bx), perpendicular to both vectors.
Three-component vectors; enter 0 for the z component to work in 2D. A dot product of zero means the vectors are perpendicular.
Where mathematically meaningful, yes. Fields specify permitted ranges and undefined operations display an error.
Exact integer calculations use safe integers; decimal calculations use browser floating point, so small rounding differences can occur.
All values remain in your browser and are never uploaded.