3d vector calculator

Interactive 3D Vector Calculator

Enter vector components below to compute addition, subtraction, dot product, cross product, magnitudes, unit vectors, angle, and projections.

Vector A

Vector B

What is a 3D vector?

A 3D vector is an ordered triple of numbers that represents direction and magnitude in three-dimensional space. You can write it as (x, y, z). Vectors are central in geometry, physics, engineering, robotics, computer graphics, and machine learning.

For example, if an object moves 2 units right, 3 units forward, and 1 unit upward, that movement can be represented by the vector (2, 3, 1). The calculator above helps you perform all common vector operations quickly and accurately.

Operations this calculator performs

1) Vector addition and subtraction

If A = (ax, ay, az) and B = (bx, by, bz), then:

  • A + B = (ax + bx, ay + by, az + bz)
  • A − B = (ax − bx, ay − by, az − bz)

2) Dot product

The dot product produces a scalar: A · B = axbx + ayby + azbz. It is useful for measuring alignment between vectors and for computing angles.

3) Cross product

The cross product returns a vector perpendicular to both inputs: A × B. This is heavily used in torque, rotational motion, and surface normal calculations.

4) Magnitude and unit vectors

The magnitude (length) of a vector is |A| = √(ax2 + ay2 + az2). The unit vector is the direction-only version: Â = A / |A| (when |A| ≠ 0).

5) Angle between vectors

The angle θ between vectors uses: cos(θ) = (A · B) / (|A||B|). The calculator reports this angle in degrees.

6) Vector projections

Projection tells how much of one vector lies in the direction of another:

  • projB(A) = ((A·B)/(B·B))B
  • Scalar projection of A on B = (A·B)/|B|

How to use this tool effectively

  • Enter all six components (Ax, Ay, Az, Bx, By, Bz).
  • Click Calculate to see all outputs at once.
  • Use Load Example to test with sample values quickly.
  • If a vector has zero length, unit vectors and some angle/projection results are undefined.

Practical applications

3D vector calculations appear in many real-world contexts:

  • Physics: force decomposition, work, torque, and momentum.
  • Computer graphics: lighting, camera direction, and surface normals.
  • Robotics: motion planning and orientation control.
  • Engineering: statics, dynamics, and structural analysis.
  • Data science: embeddings and geometric interpretation of high-dimensional vectors.

Common mistakes to avoid

  • Mixing up dot product (scalar) and cross product (vector).
  • Forgetting angle formulas require non-zero magnitudes.
  • Using inconsistent units between vector components.
  • Ignoring sign direction when interpreting vector subtraction.

If you work with geometry, linear algebra, or physics regularly, a reliable 3D vector calculator can save significant time and reduce manual arithmetic errors.

🔗 Related Calculators