Skip to content
CalculatorAtlas

Angle Between Two Vectors Calculator

Tested

Angle between two vectors.

Tested, not yet published. The formula for this calculator is implemented and passes its automated checks. This page stays non-indexable until it is reviewed and published.

Results

Enter your values and press Calculate. Results appear here.

  • • Result

Quick answer

The angle between vectors a and b is θ = arccos((a · b) ÷ (|a||b|)). For a = (1, 0) and b = (0, 1) the dot product is 0, so θ = 90° (1.5708 rad).

Enter the components of each vector, separated by commas. The calculator returns the angle in degrees and radians. Use this angle between two vectors calculator to check your own figures.

Related tools: Line Equation from Two Points Calculator: Equation of the line through two points. Slope Calculator: Slope, angle, distance and line equation through two points. LCM Calculator: Least common multiple of two or more numbers.

How to use the Angle Between Two Vectors Calculator

  1. Type vector A, for example 1, 2, 3.
  2. Type vector B, for example 1, 2, 3.
  3. Press Calculate to see the result, and use Reset to start again.
Inputs of the Angle Between Two Vectors Calculator
InputWhat to enterAllowed values
Vector AText, such as 1, 2, 3—
Vector BText, such as 1, 2, 3—

Formula and method

Formula

θ = arccos((a · b) ÷ (|a||b|))

IEEE-754 double precision; shown to at most 6 decimal places.

Uses the numerically stable form θ = 2·atan2(|â − b̂|, |â + b̂|) so parallel and opposite vectors give exactly 0° and 180°. Neither vector may be zero.

Worked examples

These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.

Example 1

Inputs: Vector A = 1, 0; Vector B = 0, 1.

Results of example 1
ResultValue
Angle90°
Radians1.570796

Example 2

Inputs: Vector A = 1, 0; Vector B = 1, 1.

Results of example 2
ResultValue
Angle45°
Radians0.785398

Example 3

Inputs: Vector A = 1, 2; Vector B = -1, -2.

Results of example 3
ResultValue
Angle180°
Radians3.141593

The first line is the headline result (angle). Below it the angle Between Two Vectors Calculator lists radians, which describe the same case from other angles. IEEE-754 double precision; shown to at most 6 decimal places.

Reading the dot product

A positive dot product means an acute angle, zero means perpendicular and negative means obtuse. For a = (3, 4) and b = (4, 3): a·b = 24, |a||b| = 25, so θ = arccos(0.96) = 16.26°.

Requirements

Vectors must be non-zero and have the same number of components. The same formula works in two, three or more dimensions.

What happens with invalid input

These messages are produced by the calculator itself, so you know what to fix.

  • Vector A: entering "0, 0" shows "Vectors must be non-zero." beside that field and no result.

Choosing between the Angle Between Two Vectors Calculator and similar calculators

Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.

Choosing between the Angle Between Two Vectors Calculator and similar calculators
CalculatorYou enterIt returns
[Line Equation from Two Points Calculator](/math/line-equation-from-two-points/)x₁, y₁ and x₂Equation
[Slope Calculator](/math/slope-calculator/)x₁, y₁ and x₂Slope
[LCM Calculator](/math/lcm-calculator/)numbersLeast common multiple
[Factor Calculator](/math/factor-calculator/)numberFactors
[Quadratic Formula Calculator](/math/quadratic-formula-calculator/)a, b and cRoots

Background: algebra

Many algebra calculators rest on the same ideas: write the problem in a standard form, identify the coefficients, apply the formula and check the answer by substituting it back. For a quadratic ax² + bx + c = 0 the roots are (−b ± √(b² − 4ac)) ÷ 2a, and the discriminant b² − 4ac decides the kind of roots: positive gives two real roots, zero gives one repeated root and negative gives two complex conjugate roots.

If a = 0 the equation is linear, not quadratic. A sign slip on the −b term shifts both roots by the same amount, so substitute your roots back to check.

Assumptions and limitations

  • Non-zero vectors

If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for vector A to confirm this.

Frequently asked questions

What if the vectors are parallel?

The angle is 0° or 180°.

What is the dot product?

The sum of products of components.

Can I use 3D vectors?

Yes, enter three components.

What does the Angle Between Two Vectors Calculator calculate?

Angle between two vectors. It returns Angle and Radians.

What formula does the Angle Between Two Vectors Calculator use?

θ = arccos((a · b) ÷ (|a||b|)). Uses the numerically stable form θ = 2·atan2(|â − b̂|, |â + b̂|) so parallel and opposite vectors give exactly 0° and 180°.

What do I need to enter in the angle Between Two Vectors Calculator?

You enter Vector A and Vector B.

How is the result rounded or limited?

IEEE-754 double precision; shown to at most 6 decimal places. Non-zero vectors.

What is an example of a angle Between Two Vectors result?

With vector A 1, 0 and vector B 0, 1, the angle is 90°.

Sources

  • OpenStax, Precalculus 2e (Rice University): vectors, polar coordinates and trigonometry

Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.