Skip to content

Vector Calculator

Enter the x, y, and z components of two vectors. The calculator returns the magnitudes, dot product, cross product, angle between the vectors, and the projection of the first vector onto the second. Use z = 0 for two-dimensional vectors.

Updated 2026-11-18 Editorial estimate Calccc Editorial Team Free · No sign-up
Scenarios A/BSave two input sets and compare the results. Stored only in this browser.
AEmpty
BEmpty

Your inputs stay in this browser. No account, no uploads.

Professional worksheet

Detailed schedule & assumptions

Inputs used, method, sensitivity, and any year-by-year table. The summary above stays compact; the audit lives here.

Professional worksheet

Inputs, scope, and sensitivity

Inputs used

Method and scope

Result audit

MetricValue

What this calculator does

Vectors describe quantities with both size and direction: force, velocity, displacement, and fields. Two vectors can be combined with a dot product, which measures how much they point the same way, or a cross product, which produces a vector perpendicular to both. The angle between them comes from the dot product and the magnitudes. This calculator handles three dimensions, so it also works for 2D problems by setting the z components to zero. It shows the intermediate magnitudes and the projection, which is useful for resolving a vector along a direction.

How to use it

  1. Enter the x, y, and z components of vector A.
  2. Enter the components of vector B.
  3. Read the dot product, magnitudes, and angle.
  4. Check the cross product for a perpendicular vector.
  5. Use the projection to see how much of A lies along B.

How it works

|A| = sqrt(Ax虏 + Ay虏 + Az虏). Dot product = AxBx + AyBy + AzBz. Cross product = (AyBz - AzBy, AzBx - AxBz, AxBy - AyBx). Angle = arccos(dot / (|A| |B|)). Projection of A onto B = (dot / |B|虏) x B. In the default case, the angle is 42.83 degrees and the dot product is 11.

Example calculations

Example 1: A = (3, 4, 0) and B = (1, 2, 2)

|A| is 5 and |B| is 3. The dot product is 11, so the angle is 42.83 degrees. The cross product is (8, -6, 2).

Example 2: Perpendicular unit vectors

A = (1, 0, 0) and B = (0, 1, 0) have a dot product of 0 and an angle of 90 degrees. The cross product is (0, 0, 1), which points along the z-axis.

Example 3: Another perpendicular pair

A = (2, -1, 3) and B = (-1, 4, 2) also have a dot product of 0 and an angle of 90 degrees. The cross product is (-14, -7, 7). The projection of A onto B is zero because the vectors are perpendicular.

What the result means

The dot product is positive when the vectors point broadly in the same direction, zero when they are perpendicular, and negative when they point away from each other. The cross product is not commutative: swapping A and B reverses its direction. Its magnitude equals the area of the parallelogram spanned by the two vectors. The angle formula is undefined if either vector has zero length, and the projection is zero in that case. These operations assume an orthonormal coordinate system with the usual right-handed orientation.

Common mistakes

  • Swapping the order of the cross product and expecting the same direction.
  • Using degrees and radians interchangeably in the angle.
  • Projecting onto a zero vector.
  • Mixing 2D and 3D components without setting the missing component to zero.
  • Treating the cross product magnitude as a scalar direction.

Assumptions and limits

  • The coordinate system is orthonormal and right-handed.
  • Components are real numbers.
  • Both vectors are nonzero for the angle and projection.
  • The projection is of A onto B, not B onto A.
  • Angles are reported in degrees.

Frequently asked questions

What is the difference between dot and cross product?

The dot product returns a scalar and measures alignment. The cross product returns a vector perpendicular to both inputs and measures the area of the parallelogram they span.

How do I use this for 2D vectors?

Set the z components of both vectors to zero. The cross product will point along the z-axis, and its magnitude is the 2D cross product.

What does the angle tell me?

It is the smaller angle between the two vectors, from 0 to 180 degrees. A value near 0 means they point the same way, 90 means perpendicular, and 180 means opposite.

Why is the projection zero for perpendicular vectors?

The projection measures the component of one vector along the other. If they are perpendicular, there is no component along that direction, so the dot product and projection are zero.

Is the cross product commutative?

No. B x A = -(A x B). The magnitude is the same, but the direction reverses. This is why the order of the vectors matters.

What happens if one vector is zero?

The angle and projection are undefined because there is no direction. The dot product is zero and the cross product is zero, but the calculator avoids dividing by zero and reports an angle of 0.

Sources

This calculator is an educational vector-math tool. It assumes an orthonormal right-handed coordinate system and nonzero vectors for angle and projection. It does not model physical units or coordinate transformations.

2026 update

How to use the professional output

This page is not just a formula box. The result is designed to be checked, compared, and taken away.

  • Professional worksheet. The result includes the inputs used, the method and scope, and a one-variable sensitivity check for finance calculators.
  • A/B scenarios. Save two input sets in the browser and compare the primary, secondary, and breakdown figures side by side.
  • Print / PDF and CSV. Print a branded worksheet, or export the year-by-year table when the calculator produces one.

The formulas and assumptions above still govern the number. The worksheet makes the estimate auditable; it does not make it a lender quote, tax return, or personalized advice.

Calccc Editorial Team · Updated 2026-11-18

Prepared by Calccc Editorial Team as an educational estimate. This page is not a licensed professional review and is not financial, medical, legal, or tax advice.

Editorial estimate prepared by the Calccc Editorial Team; not a licensed professional review.