Skip to content

DIY Cost Tools

Vector Projection Calculator

Separate a vector into the component along another direction and the component away from it. Enter the vector to project as A and the target direction as B. The target can have any nonzero length; only its direction determines the projected vector. Read the three projected components as a vector in your original coordinate system. The scalar output is signed, so it distinguishes agreement with B from opposition to B.

Enter every field, including explicit zeros. Decimal and scientific notation are accepted; commas, fractions and blank fields are rejected. Each input must be finite and no larger than 1 billion in absolute value.

Projection x3
Projection y0
Projection z0
Signed scalar projection3

How to use this calculator

  1. Match each input to its labeled coordinate, coefficient or matrix position.
  2. Check the signs and use one consistent coordinate convention.
  3. Select Calculate, or press Enter, and read the labeled results.

Formula and method

projB(A) = [(A · B)/(B · B)]B; signed scalar projection = (A · B)/|B|.

The calculation runs locally in your browser. Changing an input requires selecting Calculate again. If an input or mathematical condition is invalid, the previous result is hidden instead of leaving a stale answer visible.

Worked example

Project A = (3, 4, 0) onto B = (1, 0, 0). The dot product is 3 and B has length 1, so the vector projection is (3, 0, 0) and the signed scalar projection is 3.

Limitations and interpretation

The target vector cannot be zero. The signed scalar projection differs from projection length, which is its absolute value. Swapping the inputs changes the question. Real orthonormal Cartesian coordinates are assumed; the calculation is not a substitute for a checked engineering model.

Results are displayed to approximately 10 significant digits. The underlying calculation uses ordinary floating-point numbers and is not exact symbolic arithmetic. Rounded results can differ slightly from hand calculations. For a measured quantity, choose precision that reflects the measurements rather than all the digits shown. Verify consequential calculations independently.

Frequently asked questions

Does B need to be a unit vector?

No. The formula divides by its length, so any nonzero vector with the intended direction works.

Can I enter negative or decimal values?

Yes, provided the values meet the mathematical conditions described above. Type a normal hyphen for a negative sign. Do not type units, commas or a fraction such as 1/2; enter 0.5 instead.

Why did the calculator hide my previous result?

A missing or invalid input, undefined operation or unstable numerical case produces an explanation. Correct the input and calculate again to obtain a result for the current values.

Review notes and reference

Reviewed October 3, 2026. The stated default example and a boundary or algebraic check were tested against expected values. Input validation checks included blank fields, nonnumeric text and values outside the supported range. Wolfram MathWorld formula reference provides mathematical background. This tool is for calculation and education; its output alone does not validate a professional design.

Related calculators

Math calculators · Dot Product Calculator · Cross Product Calculator · Vector Angle Calculator · Scientific Calculator · All calculators