Angle Between Two Vectors Calculator - Degrees and Radians Result

Use this angle between two vectors calculator to find degrees, radians, cosine, dot product, and magnitudes for any 2D or 3D vector pair.

Updated: June 19, 2026 • Free Tool

Angle Between Two Vectors Calculator

Pick 2D for a flat plane or 3D for spatial coordinates.

x-component of vector A.

y-component of vector A.

z-component of vector A (ignored in 2D mode).

x-component of vector B.

y-component of vector B.

z-component of vector B (ignored in 2D mode).

Results

Angle (degrees)
0°
Angle (radians) 0rad
Dot product (a · b) 0
cos(θ) 0
Magnitude of A 0
Magnitude of B 0
Orthogonal (90°)? 0

What Is an Angle Between Two Vectors Calculator?

An angle between two vectors calculator finds the angle that separates any two vectors in 2D or 3D space using the dot product and the magnitudes. Type the six components, pick a dimension, and the page returns the angle in degrees and radians, the raw cosine, the dot product, both magnitudes, and an orthogonal flag.

  • Linear algebra homework and exams: Confirm a problem that asks for the angle between two vectors, decide whether the vectors are perpendicular, or rewrite the cosine of the angle in a different form.
  • Physics, forces, and work: Compute the angle between a force vector and a displacement vector so the work done W = F · d × cos(θ) drops out of the same dot product the calculator already evaluates.
  • Engineering, robotics, and 3D modeling: Measure the angle between two edges, two normals, or two rotation axes when you need a tolerance check or a constraint between moving parts.
  • Computer graphics and machine learning: Compare two direction vectors to decide cosine similarity, project one onto another, or sort pairs by angular distance.

If you only have x and y coordinates and your points sit on a flat plane, the 2D Distance Calculator page runs the same sqrt of squared differences on a 2D pair of points.

The angle formula is built directly on the scalar product, so if you only need a · b without the cosine step, the dot product tool on the same site returns the scalar product for the same component inputs.

How the Angle Between Two Vectors Calculator Works

The page implements the standard cosine-of-the-angle formula. It multiplies the matching components of both vectors, sums the products, divides by the product of the magnitudes, and reads the inverse cosine for the angle.

cos(θ) = (a · b) / (||a|| × ||b||), with a · b = a₁b₁ + a₂b₂ + a₃b₃ and ||a|| = √(a₁² + a₂² + a₃²)
  • a₁, a₂, a₃: Components of vector A; a₃ is ignored when the dimension selector is 2D.
  • b₁, b₂, b₃: Components of vector B; b₃ is ignored when the dimension selector is 2D.
  • a · b: Dot product, the scalar sum of the matching component products. Zero means the vectors are perpendicular.
  • ||a|| and ||b||: Magnitudes of each vector, computed as the square root of the sum of the squared components in the chosen dimension.
  • θ (theta): Angle between the two vectors, always between 0 and 180 degrees because the cosine ranges from 1 to -1.

The same formula works in 2D and 3D because the only difference is whether the third pair of components is included. Squaring the magnitudes removes the sign on every component, so negative components never push the angle outside the 0 to 180 range that acos returns.

Worked example: A = (1, 2, 3) and B = (4, -5, 6)

Vector A: (1, 2, 3). Vector B: (4, -5, 6). Dimension: 3D.

a · b = (1)(4) + (2)(-5) + (3)(6) = 12. ||a|| = √14 ≈ 3.7417. ||b|| = √77 ≈ 8.7750. cos(θ) ≈ 12 / (3.7417 × 8.7750) ≈ 0.3655. θ = arccos(0.3655) ≈ 1.1966 rad.

θ ≈ 68.56° (about 1.1966 rad); dot product 12; orthogonal No.

The two vectors lean in the same direction because the dot product is positive, but the angle is far from 0 so they are not parallel.

According to Wolfram MathWorld, the dot product equals the product of the magnitudes and the cosine of the angle, so the angle between two non-zero vectors is θ = arccos((a · b) / (||a|| ||b||)).

The two magnitudes in the denominator come from the same sqrt of squared components, so the Vector Magnitude Calculator page returns ||a|| or ||b|| on its own for the same coordinate list.

Key Concepts Behind the Angle Formula

Four ideas explain why the formula is what it is, why the result is always between 0 and 180 degrees, and what each output really measures.

Dot product as a projection

The dot product a · b equals ||a|| ||b|| cos(θ). When the two vectors are perpendicular, the projection of one onto the other is zero, so the dot product is zero too.

Cosine of the angle

cos(θ) is the cosine of the angle. It is always in the interval [-1, 1], so the angle itself is always in [0°, 180°]. A cosine of 1 means parallel, 0 means perpendicular, -1 means anti-parallel.

Magnitude of a vector

The magnitude ||a|| is the Euclidean length of the vector. In 2D it is √(a₁² + a₂²); in 3D it is √(a₁² + a₂² + a₃²). The two magnitudes sit in the denominator, so the angle is independent of the lengths.

Orthogonality test

Two non-zero vectors are perpendicular if and only if their dot product is exactly zero, their cosine is 0, and their angle is exactly 90°. The calculator flags this case with a Yes in the Orthogonal row.

All four ideas together explain every output the calculator shows. The dot product is the projection scaled by magnitudes, the cosine normalizes that projection to a unitless number, the magnitudes measure how long each vector is, and the orthogonal flag is the binary read-out of whether the cosine is zero.

When you need the vector perpendicular to both inputs instead of the scalar angle between them, the Cross Product Calculator page computes the cross product and its magnitude for the same pair.

How to Use the Angle Between Two Vectors Calculator

Six short steps cover every common case, from a clean 2D textbook example to a 3D pair with negative components on every axis.

  1. 1 Pick the dimension: Select 2D for a flat plane pair (only a₁, a₂, b₁, b₂ are used) or 3D for a spatial pair (a₃ and b₃ also feed the formula).
  2. 2 Enter vector A: Type the three components of vector A in the first row. The default is (1, 2, 3), the classic 3D example used in linear-algebra textbooks.
  3. 3 Enter vector B: Type the three components of vector B in the second row. The default is (4, -5, 6), chosen so the example includes a negative component.
  4. 4 Read the angle in degrees and radians: The primary output is the angle between the two vectors in degrees, and the second output is the same angle in radians. Both update as you type.
  5. 5 Check the cosine and dot product: Use the cosine row to confirm the raw trig value, and the dot product row to verify the scalar that drives the cosine.
  6. 6 Reset and try your own pair: Click Reset to return to the defaults, then enter your own vectors. Negative components, decimals, and large magnitudes all use the same formula.

Try A = (1, 0) and B = (0, 1) in 2D mode. The dot product is 0, the cosine is 0, the angle is 90° (1.5708 rad), and the Orthogonal row reads Yes. This is the canonical perpendicular example for 2D coordinates.

If you want the oriented angle one vector makes with the x axis, or the bearing of a direction in the xy plane, the Vector Direction Calculator page returns the signed 0 to 360 degree heading for a single vector.

Benefits of Using This Angle Calculator

These benefits matter most when you are solving a vector problem by hand and need a quick, trustworthy check before submitting the answer.

  • Skip the trig mistakes: The inverse cosine is the only place a sign or degree-versus-radian slip can cost the answer. The calculator calls acos for you and reports both units.
  • See the full pipeline: Dot product, cosine, magnitude A, magnitude B, and the angle are all on the same page. You can verify any single step without leaving the calculator.
  • Detect perpendicular vectors in one pass: The Orthogonal row returns Yes when the dot product is within floating-point distance of zero, so a 90° pair is obvious without re-entering the numbers.
  • Support any sign or magnitude: Negative components on every axis, decimal components, and components past 1,000 all use the same formula. The page does not require a pre-clean of the inputs.
  • Stay inside the math-conversion workflow: The page links to the dot product, vector magnitude, cross product, vector direction, and angle-converter tools, so the same pair of vectors can move from raw components to a converted angle without leaving the site.

The page is most useful as a check, not as a replacement for understanding the formula.

When the two vectors you have are actually pieces of a larger resultant, the Vector Addition page adds them component by component so you can find the combined vector before measuring the angle.

Factors That Affect the Angle Between Two Vectors

The formula is the same in every case, but a few factors change how the result should be read.

Direction of the two vectors

Same direction means positive dot product and 0°. Opposite direction means negative dot product and 180°. Anywhere in between, the cosine is in (-1, 1).

Lengths of the two vectors

The angle depends only on direction. Doubling both magnitudes leaves the cosine and the angle unchanged because the magnitudes cancel in the denominator.

Floating-point rounding near the extremes

Almost parallel or almost anti-parallel vectors can push the cosine slightly outside [-1, 1]. The calculator clamps the cosine before calling acos so the result stays in the real numbers.

Zero vector inputs

A zero vector has magnitude 0, which would force a divide-by-zero. The calculator detects this case, blanks the angle, and surfaces an inline error.

Choosing 2D vs 3D

In 2D mode the third components are ignored, so vectors that differ only on z are treated as equal. In 3D mode the third components count, so the same numeric pair can return a different angle.

  • This page returns the angle between two vectors as a value between 0 and 180 degrees. It does not return an oriented angle in 3D, which requires a third reference axis and is outside the scope of this calculator.
  • The formula uses the standard Euclidean dot product. It does not handle signed or complex vectors. Switch to a dedicated similarity or complex-angle tool for those variants.
  • The angle is exact up to the four-decimal display. For tighter tolerance, recompute with arbitrary-precision arithmetic or read the cosine row directly and run acos on it yourself.

According to Wikipedia, two non-zero vectors are perpendicular if and only if their dot product is exactly zero, which corresponds to an angle of 90 degrees (π/2 radians) between them.

According to MIT OpenCourseWare, the angle θ between two non-zero vectors a and b is given by cos(θ) = (a · b) / (||a|| ||b||), which means the dot product is a direct measure of how much two vectors point in the same direction.

If you need the angle in turns, gradians, or radians when the trig library you use expects a different convention, the Angle Converter page switches between degrees, radians, and other angle units without recomputing the formula.

Angle between two vectors calculator interface with 2D and 3D component inputs and the angle shown in degrees and radians
Angle between two vectors calculator interface with 2D and 3D component inputs and the angle shown in degrees and radians

Frequently Asked Questions

Q: What is the formula for the angle between two vectors?

A: The formula is cos(θ) = (a · b) / (||a|| ||b||). Multiply the matching components of a and b and add the products to get the dot product. Divide that by the product of the two magnitudes and call arccos on the result to get the angle.

Q: How do I find the angle between two 2D vectors?

A: Use the same cosine formula with just the x and y components. The dot product is a₁b₁ + a₂b₂, the magnitudes are √(a₁² + a₂²) and √(b₁² + b₂²), and the angle is arccos of the cosine. The 2D option on this calculator ignores the z inputs.

Q: How do I find the angle between two 3D vectors?

A: The 3D version adds the z terms. The dot product is a₁b₁ + a₂b₂ + a₃b₃, the magnitudes use all three squared components, and the angle is arccos of the cosine. Pick the 3D option on this calculator and fill in a₃ and b₃.

Q: What does an angle of 0 or 180 degrees between two vectors mean?

A: An angle of 0° means the two vectors point in the same direction (cosine 1, dot product equals ||a|| ||b||). An angle of 180° means they point in opposite directions (cosine -1, dot product equals -||a|| ||b||). Anywhere in between, the cosine is a smooth number in (-1, 1).

Q: Can the angle between two vectors be greater than 180 degrees?

A: No. The dot-product formula uses arccos, which always returns an angle between 0° and 180°. If you need an oriented angle (signed, 0° to 360°) for a turn or a heading, compute the oriented angle separately with the vector direction calculator.

Q: How do I know if two vectors are perpendicular?

A: Two non-zero vectors are perpendicular when their dot product is exactly zero. On this calculator that means the cosine row reads 0, the angle row reads 90°, and the Orthogonal row reads Yes. Floating-point rounding means the cosine may show as a tiny number like 1e-16 instead of zero, which still counts as orthogonal.