Skip to content

Vector Calculator

Calculate vector sums, differences, dot products, magnitudes, angles, projections and three-dimensional cross products with zero-vector handling.

2–20 comma/space-separated components. Matching dimensions are required.

Use consistent component units; angles are reported in degrees.

Preparing calculator controls…

Results

Enter your inputs and calculate to see the result.

Runs in your browser — nothing you enter is sent to a server.

How the Vector Calculator works

Enter equal-dimensional vectors. Dot products, magnitudes, addition and projection support 2–20 dimensions; the cross product is calculated only for exactly three components using the right-hand convention.

Calculate vector sums, differences, dot products, magnitudes, angles, projections and three-dimensional cross products with zero-vector handling.

Formula

A·B = ΣAiBi; angle = acos((A·B)/(|A||B|)); projB(A) = B(A·B)/|B|²; A×B uses the 3D determinant convention.

Angle is undefined if either vector is zero; projection onto zero B is undefined. Components must be zero or have magnitude from 1e-9 to 1e9. Results use floating-point arithmetic with display rounding, not arbitrary-precision symbolic algebra.

Examples

Perpendicular unit vectors

A=(1,0,0) and B=(0,1,0) have dot product 0, angle 90 degrees, projection (0,0,0) and cross product (0,0,1).

Parallel vectors

A=(2,0) and B=(1,0) have dot product 2, angle 0 degrees and projection (2,0). A 3D cross product is intentionally unavailable for these 2D inputs.

Frequently asked questions

What does this calculation assume?

Enter equal-dimensional vectors. Dot products, magnitudes, addition and projection support 2–20 dimensions; the cross product is calculated only for exactly three components using the right-hand convention.

Which limitations matter for this tool?

Angle is undefined if either vector is zero; projection onto zero B is undefined. Components must be zero or have magnitude from 1e-9 to 1e9. Results use floating-point arithmetic with display rounding, not arbitrary-precision symbolic algebra.

How can I check the result?

A=(1,0,0) and B=(0,1,0) have dot product 0, angle 90 degrees, projection (0,0,0) and cross product (0,0,1). Compare this worked case before using your own inputs.

Information:

Good to know

Angle is undefined if either vector is zero; projection onto zero B is undefined. Components must be zero or have magnitude from 1e-9 to 1e9. Results use floating-point arithmetic with display rounding, not arbitrary-precision symbolic algebra.

Reference: OpenStax: dot products, angles and projections. The implementation scope and conventions above are authoritative for this worksheet.

Additional reference: OpenStax: the right-hand cross product.

Matrix Calculator

Add, subtract and multiply matrices, and find the determinant, inverse and transpose.

Math Tools

Triangle Calculator

Solve any triangle from three sides or angles: SSS, SAS, ASA, AAS and the two-triangle SSA case.

Math Tools