Vector calculator
A vector calculator works out a vector's magnitude (its length) and direction, adds two vectors together, and finds the dot product, the cross product and the angle between them. In our Vector Calculator you type each vector's components, or drag its arrow on the grid, and every result updates as you go, in 2D or 3D.
It has three modes: Single for one vector, Two Vectors for adding and comparing a pair in 2D, and 3D for vectors with x, y and z components.
Vectors Calculator
Visualise magnitude, direction and operations
How to use the vector calculator
- Under Mode, choose Single, Two Vectors or 3D.
- In Vectors, type the x and y components of vector a, and of vector b if you have two. In 3D mode each vector also has a z component.
- Or drag the tip of an arrow on the grid. Turn on Snapping under Display to land on whole numbers.
- Read the Results: the magnitude and direction in Single mode; the dot product, angle and resultant in Two Vectors mode; the magnitudes, dot product, angle and cross product in 3D.
- Open Formulas to see each formula with your numbers worked through, including the unit vector in 2D.
Angles are in degrees unless you turn off Degrees under Display. The 3D view can be rotated, so it doubles as a 3D vector plotter. For practice, Practice and help sets random vector questions with hints and worked solutions.
Magnitude and direction of a vector
A 2D vector with components (x, y) has a magnitude given by Pythagoras, and a direction measured anticlockwise from the positive x-axis:
Example 1: magnitude and direction
Find the magnitude and direction of (6, 8).
The direction is tan⁻¹(8/6) = 53.13°. In Single mode, type x = 6 and y = 8: the Results show |a| = 10 and θ = 53.13°.
Example 2: a vector pointing left
For (−4, 3), the magnitude is √(16 + 9) = 5. But tan⁻¹(3/−4) gives −36.87°, which points the wrong way: the vector points up and to the left, into the second quadrant. Add 180° to get 143.13°, which is what the calculator shows. Always sketch the vector to check the quadrant.
Vector addition calculator: the resultant
To add vectors, add their components: (a₁, a₂) + (b₁, b₂) = (a₁ + b₁, a₂ + b₂). The sum is called the resultant. On a diagram, place b so it starts where a ends; the resultant goes from the start of a to the end of b.
Example 3: adding two vectors
Add a = (3, 4) and b = (5, −2).
The resultant has magnitude √(8² + 2²) = √68 ≈ 8.25 and direction tan⁻¹(2/8) = 14.04°. In Two Vectors mode, type both vectors: the Results give |r| = 8.25 and θr = 14.04°, and Formulas shows r = a + b = (8, 2).
Subtracting vectors
The calculator adds vectors but has no subtract button. To find a − b, type −b instead of b, which means changing the sign of each of its components, and read the resultant. For a = (3, 4) and b = (5, −2), type b as (−5, 2): the resultant is (−2, 6), which is a − b.
Dot product and the angle between two vectors
The dot product multiplies matching components and adds them: a · b = a₁b₁ + a₂b₂. It is a number, not a vector, and it gives the angle between the vectors:
For a = (3, 4) and b = (5, −2), a · b = 15 − 8 = 7, and the angle is 74.93°. If the dot product is 0, the vectors are perpendicular: (2, 3) and (−6, 4) give 2 × (−6) + 3 × 4 = 0, and the calculator shows θ = 90°. Our dot product calculator guide goes further, with 3D examples.
3D vector calculator: magnitude and cross product
In 3D mode each vector has three components, and the magnitude is √(x² + y² + z²). The calculator also gives the dot product, the angle between the vectors and the cross product, which is a vector perpendicular to both.
Example 4: two 3D vectors
Take a = (1, 2, 2) and b = (3, 0, 4).
- Magnitudes: |a| = √(1 + 4 + 4) = 3 and |b| = √(9 + 0 + 16) = 5.
- Dot product: 1 × 3 + 2 × 0 + 2 × 4 = 11, so cos θ = 11 ÷ 15 and θ = 42.83°.
- Cross product: a × b = (2 × 4 − 2 × 0, 2 × 3 − 1 × 4, 1 × 0 − 2 × 3) = (8, 2, −6).
Type both into 3D mode and the Results match. The cross product calculator guide explains the cross product formula and the right-hand rule.
Check you have the magnitude formula:
What the calculator gives in each mode
| Result | Single | Two Vectors | 3D |
|---|---|---|---|
| Magnitude | Yes | For a, in Formulas | Yes, for both |
| Direction angle | Yes | For the resultant, and for a in Formulas | No |
| Resultant a + b | No | Yes | No |
| Dot product | No | Yes | Yes |
| Angle between | No | Yes | Yes |
| Cross product | No | No | Yes |
| Unit vector | In Formulas | In Formulas, for a | No |
Common mistakes
- Getting the direction in the wrong quadrant. tan⁻¹ only gives angles between −90° and 90°. Sketch the vector and add 180° when it points left.
- Adding magnitudes instead of components. |a + b| is usually not |a| + |b|. Add the components, then find the magnitude.
- Dropping a negative when squaring. (−3)² is 9, not −9.
- Treating the dot product as a vector. It is a single number. The cross product is the one that gives a vector.
- Subtracting in the wrong order. a − b and b − a point in opposite directions.
Practise vectors in a short timed paper
Vectors come up in Geometry, Algebra 2 & SAT Math and College Linear Algebra practice, and in GCSE Maths Higher and A-level Maths: Mechanics in the UK. Each daily paper is a short timed paper of 8 questions worth 25 to 35 marks, and the papers mix topics.
Common questions
How do you find the magnitude of a vector?
How do you add two vectors?
How do you find the direction of a vector?
Can the calculator subtract vectors?
What is the difference between the dot product and the cross product?
What does a dot product of zero mean?
Revision cards
Say the answer first, then flip the card to check it.
Where to go next
- Solve it
Vectors Calculator
Visualise magnitude, direction and operations
Open the tool - Test it
Geometry, Algebra 2 & SAT Math
A new exam-style paper every day, with instant marking and a mark scheme
Start today's paper - Test it
College Linear Algebra
A new exam-style paper every day, with instant marking and a mark scheme
Start today's paper