Vector Addition Calculator
Adding vectors is not adding plain numbers: a displacement of (3, 4) followed by (1, 2) lands at (4, 6), and the direction of that result matters as much as its size. This calculator adds or subtracts two or three vectors in 2D or 3D, entered as components or, in 2D, as magnitude and angle, and returns the resultant with its magnitude, direction and unit vector, the step-by-step working, and a head-to-tail diagram drawn from your numbers.
Vector A
Vector B
Direction uses atan2, which returns the correct angle in the correct quadrant, between -180 and 180 degrees. The unit vector is the resultant divided by its own magnitude.
Quick Answer
Add A = (3, 4) and B = (1, 2) and the resultant is (4, 6): magnitude 7.2111, direction 56.3099 degrees from the positive x-axis, unit vector (0.5547, 0.8321). Those values are pre-filled in the calculator above, so one click on Calculate reproduces them. Switch the operation to Subtract and the same inputs give (2, 2) instead.
Key takeaways
- Vectors add component by component: x with x, y with y, z with z. Nothing else about the inputs changes the rule.
- The calculator handles two or three vectors, addition and subtraction, in 2D and 3D, with components or (in 2D) magnitude and angle.
- Direction comes from atan2, so a resultant pointing down-left reports a negative angle in the correct quadrant instead of the mirrored angle plain arctan would give.
- A zero resultant is reported honestly: magnitude 0, direction and unit vector undefined, never a fake 0 degrees.
- Quick Answer
- How to use the vector addition calculator
- The formulas: components, polar conversion, magnitude, direction
- Worked example: (3, 4) plus (1, 2)
- Direction done right: atan2 and the four quadrants
- The head-to-tail diagram
- What competing calculators miss
- Edge cases: zero resultants, 3D polar entry, longer chains
- Frequently asked questions
- Add This Calculator to Your Website
- References
How to use the vector addition calculator
Four choices at the top set the shape of the problem, then each vector gets one row of inputs. Results stay hidden until you click Calculate.
- Pick the dimension and count: 2D or 3D, and two or three vectors. Choosing 3 reveals the Vector C panel and the z fields.
- Pick the operation: Add for A + B (or A + B + C), Subtract for A – B (or A – B – C). Subtraction flips the sign of every component of B and C before combining.
- Pick the input style (2D only): Components, or Magnitude and angle when your vectors come as lengths and bearings in degrees. The pre-filled polar values, A: 5 at 53.1301 degrees and B: 2.2361 at 63.4349 degrees, are the same two vectors as the component example, so both styles return (4, 6).
- Click Calculate: the resultant appears as the headline, followed by tiles for magnitude, unit vector and direction (or azimuth and elevation in 3D), the component-by-component working, and the head-to-tail diagram. Copy my results copies the headline plus the working; Share results does the same through the share sheet.
- Reset restores the worked example values and hides the results.
Blank or missing fields are rejected with a specific message, such as “Enter the x component of vector A.” or “Enter the magnitude of vector B.”, and a negative magnitude is rejected with “Magnitude cannot be negative.” One reading note for the working panel: squares are written with a superscript 2, so “sqrt(4² + 6²)” there means the square root of 4 squared plus 6 squared. The magnitude itself is computed at full precision and rounded only for display, to four decimal places.
The formulas: components, polar conversion, magnitude, direction
Every output on this page comes from four formulas. The resultant is built component by component, its length is the Pythagorean length of that resultant, and its direction is an atan2 angle.
Polar to components: x = m × cos(angle), y = m × sin(angle), angle in degrees from the positive x-axis.
Magnitude: |R| = √(Rx² + Ry²) in 2D, with + Rz² added under the root in 3D.
Direction (2D): angle = atan2(Ry, Rx), reported between -180 and 180 degrees.
Unit vector: R ÷ |R|, each component divided by the magnitude.
The magnitude formula is the same square root of squared components that the vector length calculator applies to a single vector; here it is applied to the resultant the addition produces. In 3D the tool splits direction into two angles instead of one: azimuth, the atan2 angle inside the x-y plane, and elevation, asin(Rz ÷ |R|), the angle above that plane. OpenStax University Physics presents the same component method: resolve each vector, add the components, then rebuild magnitude and direction from the sums, as its coordinate systems and components section sets out.
Subtraction deserves one warning: it is not the cross product. A – B is still a vector in the same plane, pointing from the tip of B to the tip of A. The cross product calculator covers the different 3D operation that returns a vector perpendicular to both inputs.
Worked example: (3, 4) plus (1, 2)
The pre-filled inputs add A = (3, 4) and B = (1, 2). Run by hand, the x components give 3 + 1 = 4 and the y components give 4 + 2 = 6, so the resultant is (4, 6) before any magnitude or angle exists.
The same calculator, run on five more input sets, produces the checks below. Every row is a real run, so you can switch the modes and type any row in to get the same figures back.
| Run | Inputs | Resultant | Magnitude | Direction |
|---|---|---|---|---|
| Subtract, 2D | (3, 4) – (1, 2) | (2, 2) | 2.8284 | 45 deg |
| Three vectors, 2D | (1, 0) + (0, 1) + (1, 1) | (2, 2) | 2.8284 | 45 deg |
| Add, 3D | (1, 2, 3) + (4, 5, 6) | (5, 7, 9) | 12.4499 | Azimuth 54.4623 deg, elevation 46.2942 deg |
| Polar entry, 2D | 5 at 53.1301 deg + 2.2361 at 63.4349 deg | (4, 6) | 7.2111 | 56.3099 deg |
| Cancelling pair | (1, 1) + (–1, –1) | (0, 0) | 0 | Undefined (zero vector) |
A useful cross-check on any pair of inputs: if A and B happen to be perpendicular, their dot product is zero. The dot product calculator runs that check from the same components, and a zero there plus this page’s resultant gives you the full picture of how the two vectors relate.
Direction done right: atan2 and the four quadrants
The direction is the angle of the resultant from the positive x-axis, measured counterclockwise, and the calculator gets it from atan2 rather than a bare arctan. That choice is the difference between a correct angle and a plausible-looking wrong one.
Plain arctan sees only the ratio Ry ÷ Rx. The resultants (4, 6) and (–4, –6) share the ratio 1.5, so arctan reports 56.31 degrees for both, even though the second vector points in exactly the opposite direction. atan2 reads the signs of the two components separately and returns 56.3099 degrees for the first and –123.6901 degrees for the second. Every direction this tool reports sits between –180 and 180 degrees: positive above the x-axis, negative below it, with 180 and –180 both meaning straight along negative x. The MDN reference for Math.atan2 documents that sign-aware behaviour, and it is why physics texts build direction from atan2 rather than from the ratio alone.
| Resultant points | Example | atan2 direction | Plain arctan would say |
|---|---|---|---|
| Up and right | (4, 6) | 56.3099 deg | 56.31 deg (right by luck) |
| Down and left | (–4, –6) | –123.6901 deg | 56.31 deg (wrong) |
| Down-left diagonal | (–1, –1) | –135 deg | 45 deg (wrong) |
| Straight down | (0, –5), from adding (0, –2) and (0, –3) | –90 deg | Undefined (division by zero) |
The head-to-tail diagram
For 2D calculations the results include a diagram drawn from your actual inputs: each vector is placed tail to tip in its own color, and the dashed green resultant runs from the first tail to the last tip. That picture is the definition of vector addition, not a decoration.
It earns its place twice over. First, it makes subtraction obvious: in Subtract mode the diagram draws –B and –C as reversed arrows, so you can watch the resultant shrink or swing as the subtracted vectors grow. Second, it catches sign slips that numbers hide: if you typed a component with the wrong sign, the chain of arrows visibly bends the wrong way before you trust the magnitude. Navigation work runs on exactly this picture, since a ground track is an air velocity arrow chained to a wind arrow. In 3D mode the diagram is replaced by a short note explaining that the picture is 2D only; the numeric results, including azimuth and elevation, are unaffected. The University of Colorado Boulder’s PhET vector addition simulation lets you drag the same head-to-tail construction around by hand if you want to build the intuition physically.
What competing calculators miss
Vector tools cluster into a few camps, and each camp gives something up:
- Two-vector ceilings (Omni, CalculatorDock, Savvy): solid component math, but most stop at two vectors and several return only the resultant components, leaving magnitude, direction and the unit vector to you. Omni’s own FAQ states direction as a plain arctan formula, the quadrant-losing version this page avoids.
- Arctan direction (Brave Calculator and similar): the worked examples look right because they stay in the first quadrant. Feed one a resultant like (–4, –6) and the stated formula points it the wrong way.
- Velocity-only framing (resultant velocity tools): good physics storytelling for planes and swimmers, but the tool is dressed for one subject. Forces, displacements and abstract vectors get no home.
- Kitchen-sink vector tools (multi-operation calculators): addition buried among dot, cross, projection and angle modes, with quirks like a blank third component silently reclassifying the vector’s dimension. The operation you came for should not need a manual.
- The gap this page fills: two or three vectors, add and subtract, 2D and 3D, components or magnitude-and-angle, with the unit vector, azimuth and elevation, the full working, and a diagram drawn from the inputs, plus honest handling of the zero vector instead of a fabricated angle.
Edge cases: zero resultants, 3D polar entry, longer chains
Three situations trip people up, and the calculator takes a stated position on each. First, cancellation: inputs that sum to (0, 0), or (0, 0, 0) in 3D, produce magnitude 0 with direction and unit vector reported as undefined, because a length-zero vector points nowhere. Second, polar entry in 3D: the Input style control switches off and reverts to Components, since one angle cannot pin down a 3D direction; the outputs still describe direction fully, as azimuth plus elevation. Third, chains longer than three vectors: add the first three, then feed the resultant back in as vector A with the next vector as B. Addition is associative and commutative, a property MathWorld’s vector addition entry states formally, so the chained answer equals the all-at-once answer every time.
Rounding is the last quiet detail. Components, magnitude, direction and unit vector are all shown to four decimal places, while the arithmetic underneath runs at full precision. A polar entry typed from a rounded source, such as 2.24 at 63.43 degrees instead of 2.2361 at 63.4349 degrees, therefore lands a hair off the component answer: (4.0019, 6.0034) with magnitude 7.215 in a real test run. That gap belongs to the rounded inputs, not to the addition.
Frequently asked questions
Add the matching components: x with x, y with y, and z with z in 3D. For example, (3, 4) + (1, 2) = (4, 6). This calculator then reports the magnitude 7.2111, the direction 56.3099 degrees, and the unit vector (0.5547, 0.8321) for that resultant.
Yes. Set Operation to Subtract and the tool computes A minus B, or A minus B minus C with three vectors. With the pre-filled example, (3, 4) minus (1, 2) = (2, 2), with magnitude 2.8284 and direction 45 degrees. Geometrically, subtracting B is adding the reversed vector -B.
Plain arctan looks only at the ratio Ry/Rx, so it cannot tell (4, 6) from (-4, -6): both ratios are 1.5. atan2 uses the signs of both components, returning 56.3099 degrees for (4, 6) and -123.6901 degrees for (-4, -6), the correct quadrant in each case.
The unit vector is the resultant divided by its own magnitude, so it points the same way but has length exactly 1. For the resultant (4, 6) it is (0.5547, 0.8321). It is the standard way to carry pure direction into physics and graphics calculations without the size attached.
Yes, in 2D. Choose Magnitude and angle under Input style and the tool converts each vector with x = m cos(angle) and y = m sin(angle), with the angle in degrees from the positive x-axis. In 3D the option switches off, because a single angle cannot describe a 3D direction: 3D vectors are entered by components, and the results report azimuth and elevation instead.
Add the first three here, note the resultant, then run a second calculation with that resultant as vector A and the fourth vector as B. Vector addition is associative, so the grouping cannot change the final answer.
That message appears when the resultant is the zero vector (0, 0), which happens when the inputs cancel exactly, such as (1, 1) plus (-1, -1). A vector with length 0 points nowhere, so it has no direction and no unit vector, and the tool says so instead of printing a misleading 0 degrees.
Azimuth is the direction angle inside the x-y plane, measured from the positive x-axis, and elevation is the angle of the resultant above that plane. For (1, 2, 3) + (4, 5, 6) = (5, 7, 9), the tool reports azimuth 54.4623 degrees and elevation 46.2942 degrees alongside magnitude 12.4499.
Add This Calculator to Your Website
Embed this calculator on your own site with the code below. Pick a size to preview it live, then copy the code.
Powered by Calculator Zilo
References
- OpenStax, Rice University. University Physics Volume 1, Section 2.1: Scalars and Vectors (vector definition, magnitude and direction, the zero vector). Accessed October 24, 2026.
- OpenStax, Rice University. University Physics Volume 1, Section 2.2: Coordinate Systems and Components of a Vector (component form, polar conversion, unit vectors). Accessed October 24, 2026.
- Eric W. Weisstein, Wolfram MathWorld. Vector Addition (componentwise definition, commutativity and associativity). Accessed October 24, 2026.
- Eric W. Weisstein, Wolfram MathWorld. Unit Vector (a vector divided by its own magnitude). Accessed October 24, 2026.
- MDN Web Docs, Mozilla. Math.atan2() (two-argument arctangent returning the correct quadrant, -pi to pi). Accessed October 24, 2026.
- University of Colorado Boulder, PhET Interactive Simulations. Vector Addition simulation (head-to-tail and parallelogram constructions you can drag). Accessed October 24, 2026.
