All Over Tools logo
Tool Combiner
Analyze Tools Clean Tools Compare Tools Convert Tools Data Validation Extract Tools Format Tools Generate Tools Organize Tools Transform Tools
Audio Tools Font Tools Image Tools Subtitle Tools Video Tools
Archive Tools Document Tools Ebook Tools File Management Tools PDF Tools Presentation Tools
Config Tools Database Tools Dataset Tools JSON Tools Parser Tools Spreadsheet Tools XML Tools
Business Calculators Construction Calculators Date And Time Calculators Education Calculators Financial Calculators Food Calculators Health Calculators Math Calculators Science Calculators Sports Calculators Statistics Calculators
Blog About Us Contact Us

Vector Calculator

Calculate magnitude, unit vector, addition, subtraction, scalar multiplication, dot product, cross product, angle between vectors, and projection - for 2D and 3D vectors, with formulas and exact values shown at every step.

Each component accepts a plain number (e.g. -3, 2.5) or a simple fraction (e.g. 3/4).

A B A + B
Vector addition: A + B by placing B's tail at A's tip.
A B proj_B(A)
Projection: proj_B(A) is the shadow A casts onto the line of B.

Steps for a vector calculation

Start with the operation that matches the result you need. The Vector Calculator then shows the result, its formula, and the calculation steps. Exact fraction output is kept for the operations that use component-wise arithmetic.

  1. Select Magnitude & Unit Vector, Add / Subtract, Scalar Multiply, Dot Product, Cross Product, Angle Between, or Projection.
  2. Select 2D ⟨x, y⟩ or 3D ⟨x, y, z⟩.
  3. Enter the x and y values for Vector A, then Vector B or k when the selected operation shows those fields.
  4. For Add / Subtract, select A + B or A − B.
  5. Click Calculate.
  6. Use Copy result or Download result (.txt) after the result appears.

What each vector operation returns

Magnitude & Unit Vector reports the magnitude, a decimal unit-vector approximation, and the direction cosine and angle for each axis. A zero Vector A is rejected because it has no direction for a unit vector. Scalar Multiply applies k to Vector A and reports the magnitude of the result.

Dot Product returns one number and calculates an angle when both vectors are nonzero. Cross Product returns a vector in 3D. In 2D, it returns the signed scalar ax*by − ay*bx; the absolute value is the parallelogram area, and the sign indicates orientation. Projection returns the vector projection of Vector A onto Vector B, the scalar projection, and the component perpendicular to Vector B.

Vector A = (1, 2)
Vector B = (4, 5)
Add / Subtract = A + B
Result = (5, 7)

Entering 2D and 3D vectors

Select 2D ⟨x, y⟩ or 3D ⟨x, y, z⟩. That choice controls every vector field, so Vector A and Vector B always have matching dimensions. Enter plain numbers or fractions such as -3, 2.5, and 3/4. The parser rejects an empty field, a zero denominator, or text that is not a number or fraction.

In 2D, Cross Product returns the signed scalar z-component of the equivalent 3D cross product. The calculator has no option beyond 3D and does not perform symbolic algebra or a physics simulation.

Exact results and zero-vector checks

Fractions, addition, subtraction, scalar multiples, dot products, and cross products stay exact. Magnitudes, unit-vector values, direction-cosine values, and angles use decimal displays because they involve square roots or arccosine. After you click Calculate, the formulas and intermediate steps appear in Result under Formulas & steps.

Magnitude & Unit Vector rejects zero Vector A. Angle Between rejects either zero vector, and Projection rejects a zero Vector B. Dot Product returns zero for a zero input, while Cross Product returns the zero result. Reset clears the vector and scalar fields, hides errors, and hides the result.

Checking a sum or projection

For a component check, enter the two vectors and choose Add / Subtract. With (1, 2) and (4, 5), the A + B result is (5, 7).

For a projection, choose Projection and enter Vector A and Vector B. The result separates the part of Vector A along Vector B from the perpendicular component.

When another calculator fits better

Use Math Calculators for an equation, fraction, sequence, matrix, geometry, or scientific calculation. Choose Vector Magnitude Calculator for the length of a 2D, 3D, or higher-dimensional vector. Choose Distance Formula Calculator for the straight-line distance between two coordinate points. Use Matrix Calculator for matrix operations or solving Ax = b.

The page parses and calculates entered vector values in the browser. The calculator script does not submit those values.

Frequently asked questions

What can a vector calculator calculate?

This Vector Calculator calculates magnitude, unit vector, addition, subtraction, scalar multiplication, dot product, cross product, angle between vectors, and projection for 2D or 3D input.

How do I enter 2D or 3D vectors?

Select 2D ⟨x, y⟩ or 3D ⟨x, y, z⟩, then fill every visible x, y, and z field for Vector A and Vector B. Both vectors use the same dimension selection.

How does a 2D cross product work?

In 2D, Cross Product returns the signed scalar z-component ax*by − ay*bx of the equivalent 3D cross product. The absolute value gives the parallelogram area, and the sign indicates orientation.

Why does the vector calculator reject a zero vector?

A zero vector has no direction. Magnitude & Unit Vector cannot form a unit vector, Angle Between cannot find an angle, and Projection cannot use a zero Vector B. Dot Product and Cross Product still return zero results for a zero input.

Does the Vector Calculator keep fractions exact?

Yes. Component-wise arithmetic, scalar multiples, dot products, and cross products keep parsed fractions exact. Magnitude, unit-vector, direction-cosine, and angle values are displayed as decimals.

Related Tools

47 views