Vector Calculator
Calculate 2D or 3D vector operations with explicit projection direction, angle units and clear zero-vector errors.
This tool processes its input contents in your browser instead of sending them to a processing service. Page, asset and fixed usage-measurement requests are described on the Privacy page.
Calculate 2D or 3D vector operations with explicit projection direction, angle units and clear zero-vector errors.
How to use it
- 1Choose an operation and 2D or 3D, then fill the labelled vector components.
- 2Use equal dimensions; choose angle units when calculating an angle.
- 3Calculate and check the operation direction and zero-vector rules.
- 4Download the full numeric result and calculation assumptions.
Example
- Input
- A: 1, 2, 3; B: 4, -5, 6
- Output
- A · B = 12.
In Cross mode, the same pair produces [27, 6, -13]. The two operations answer different questions.
What happens to your data
Vector components and result directions remain in this browser workspace. Only your downloaded JSON contains the supplied components and operation; anonymous workflow events do not include them.
Last updated November 2026
Calculate dot products, a 3D cross product, magnitudes, unit directions, projections and angles from two- or three-component vectors. The operation labels state the order explicitly: projection is A onto B, and cross product is A × B. Zero-vector domain errors remain visible instead of being replaced with an invented direction or angle.
How it works
Use a consistent Cartesian component order. Choose 2D or 3D and enter the labelled x, y and optional z components. Paste values also accepts 1, 2 for a 2D vector or 1, 2, 3 for 3D. Binary operations need vectors of the same dimension. A dot product produces a scalar; addition, subtraction and projection produce vectors. Magnitude and unit direction use A only. The cross product here is the ordinary right-handed 3D operation, so two-component inputs are rejected for that mode.
Projection finds the component vector of A in B's direction. It is calculated using B's unit direction rather than dividing directly by its squared magnitude. Reversing A and B changes the question and can change the result. The unsigned angle is reported from zero to 180 degrees, or zero to pi radians, under the unit setting shown beside the input. Normalized components and a quadrant-aware atan2 calculation avoid relying solely on acos close to parallel or opposite vectors.
A zero vector can be added, subtracted, dotted or crossed. Its magnitude is zero. It has no unit direction and no angle with another vector; projection onto a zero B is also undefined. Projection of a zero A onto a nonzero B is valid and equals zero. These cases are separate mathematical questions, so the tool does not apply one blanket zero-vector rule.
Inputs are approximate finite decimals with optional e notation. Nonzero component magnitudes range from 1e-100 to 1e100. Calculations use binary64 floating-point arithmetic; on-screen values show up to twelve significant digits and JSON preserves the available digits. A very small rounding residual is not an exact symbolic proof of parallelism, orthogonality or physical precision. Each input field is at most 16 KiB, and result and working JSON files are separately bounded to 32 KiB.
This tool does not infer measurement units, convert coordinate frames, validate a mechanical model or carry out symbolic vector calculus. Use the same coordinate system for both inputs. Edits clear the previous exports immediately, keeping the saved output tied to the actual component values and operation that produced it.
Worked example: Compute a dot product
- Input
- A: 1, 2, 3; B: 4, -5, 6
- Result
- A · B = 12.
In Cross mode, the same pair produces [27, 6, -13]. The two operations answer different questions.
Common use cases
- Check a 2D or 3D dot product from stated components.
- Find a right-handed normal vector using a 3D cross product.
- Separate a vector component in another vector's direction.
- Compare unsigned directions in degrees or radians and export the assumptions.
Frequently asked questions
Is the projection A onto B or B onto A?+
The calculator projects A onto B. The result is parallel to B, and its component in that direction comes from A.
Why does cross product reject a 2D vector?+
This workspace implements the ordinary 3D cross product, which returns a vector. A 2D signed determinant is a scalar convention and is not silently substituted.
What happens with a zero vector?+
Magnitude, addition, subtraction, dot and cross can use zero. A unit direction or angle for zero is undefined; projection onto zero is undefined, while projecting zero onto a nonzero vector is valid.
Does a displayed zero prove two measured vectors are exactly perpendicular?+
No. These are approximate calculations on the supplied decimal components. Display rounding and measurement uncertainty are separate from an exact mathematical proof.
Standards and limitations
Related tools
Permutation & Combination Calculator
Count selections and arrangements exactly, choose whether repetition is allowed, and export large integer results without rounding.
Business Day Calculator
Count or offset working dates using chosen weekdays and your own excluded dates, then export the exact date schedule and assumptions.
Ohm’s Law Calculator
Find positive DC voltage, current, resistance and power from two known quantities, with unit prefixes, equations and CSV output.
Triangle Solver
Solve a triangle from three known measurements, with all sides, angles, area, altitudes and a downloadable diagram.