Current for 2026As of: July 2026

Vector Calculator Dot Product · Cross Product · Angle · Magnitude.

Add and subtract 2D and 3D vectors, and calculate dot product, cross product, magnitude and angle

FreeNo sign-upGDPR-compliant

Vector Calculator

Addition, subtraction, dot product, cross product, magnitude and angle for 2D and 3D vectors

Vector a

Vector b

a + b

579

a − b

-3-3-3

Dot product a · b

32

Cross product a × b (3D only)

-36-3

Magnitudes (length)

|a| = 3.7417

|b| = 8.775

Angle between a and b

12.9331°

Vector calculation – basics

Addition, dot product, cross product, magnitude and angle for 2D and 3D vectors

A vector describes a quantity with magnitude and direction, represented as a tuple of components – e.g. (x, y) in 2D space or (x, y, z) in 3D space. This calculator supports both cases.

For addition and subtraction, the components are calculated individually: a⃗ ± b⃗ = (a₁±b₁, a₂±b₂, a₃±b₃).

The dot product a⃗ · b⃗ = a₁b₁ + a₂b₂ + a₃b₃ yields a number and is used to calculate the angle between two vectors: cos(φ) = (a⃗ · b⃗) / (|a⃗| · |b⃗|). The cross product a⃗ × b⃗, on the other hand, yields a new vector perpendicular to both original vectors – it is defined exclusively in 3D space.

The magnitude (length) of a vector is calculated as the square root of the sum of the squared components: |a⃗| = √(a₁² + a₂² + a₃²) – a direct application of the Pythagorean theorem.

Calculation examples

Dot product: a=(1,2,3), b=(4,5,6)

Dot product: a=(1,2,3), b=(4,5,6)
PositionBetrag
Formulaa₁b₁ + a₂b₂ + a₃b₃
Substituting1·4 + 2·5 + 3·6
a · b32

Cross product: a=(2,3,4), b=(5,6,7)

Cross product: a=(2,3,4), b=(5,6,7)
PositionBetrag
Formula(a₂b₃−a₃b₂, a₃b₁−a₁b₃, a₁b₂−a₂b₁)
Substituting(3·7−4·6, 4·5−2·7, 2·6−3·5)
a × b(−3, 6, −3)

Angle: a=(1,0), b=(0,1)

Angle: a=(1,0), b=(0,1)
PositionBetrag
a · b0
cos(φ) = (a·b)/(|a|·|b|)0 / (1·1) = 0
φ = arccos(0)90°

Frequently asked questions about the vector calculator

Dot product, cross product, angle and magnitude explained clearly

The dot product (also scalar product) of two vectors is calculated component-wise: a⃗ · b⃗ = a₁b₁ + a₂b₂ (+ a₃b₃ in 3D space). The result is a number (scalar), not a vector. Example: (1,2,3) · (4,5,6) = 1·4 + 2·5 + 3·6 = 32.

The cross product (vector product) is only defined for 3D vectors and yields another vector that is perpendicular to both original vectors: a⃗ × b⃗ = (a₂b₃−a₃b₂, a₃b₁−a₁b₃, a₁b₂−a₂b₁). For 2D vectors, no cross product exists in this sense.

By rearranging the geometric definition of the dot product: cos(φ) = (a⃗ · b⃗) / (|a⃗| · |b⃗|), i.e. φ = arccos((a⃗ · b⃗) / (|a⃗| · |b⃗|)). If the vectors are perpendicular to each other, the dot product is 0 and the angle is 90°.

The magnitude results from the square root of the sum of the squared components: |a⃗| = √(a₁² + a₂² + a₃²) in 3D space or |a⃗| = √(a₁² + a₂²) in 2D space. This is a direct application of the Pythagorean theorem.

No. Addition, subtraction, dot product and angle calculation require both vectors to have the same dimension (both 2D or both 3D). The cross product is additionally defined exclusively for 3D vectors. Our calculator shows a clear error message in these cases.

For business

Calculators for your website or app

Integrate our GDPR-compliant calculators as a widget or use our API. Perfect for HR portals, career pages and financial applications.

  • 100% GDPR-compliant - no cookies, no data storage
  • White-label - your branding, your colors
  • REST API for your own applications
  • Built by HEADON.pro - your digital agency
Learn more about HEADON.pro →

Request without obligation

Receive an individual quote from HEADON.pro

Your data will only be used to get in touch with you.
Privacy