Calculate vertical and horizontal vector components from magnitude and angle, or find the resultant magnitude and angle for two vectors.

Measured counterclockwise from the rightward horizontal; e.g. 120° points up and to the left.

Output units

Calculator Functions

FunctionWhat it doesWhat it requires
Horizontal & vertical componentsFinds the horizontal and vertical components of a vectorRequires the vector magnitude and its angle
Vertical component and angleFinds the magnitude and the horizontal component from the vertical componentRequires the signed vertical component and the angle
Horizontal component and angleFinds the magnitude and the vertical component from the horizontal componentRequires the signed horizontal component and the angle
Both components → magnitude and angleFinds the magnitude and direction of a vector from its two componentsRequires the signed horizontal and vertical components
Resultant of one or two vectorsAdds two vectors and gives the magnitude, direction and components of the resultRequires the magnitude and angle of the first vector, plus the same for an optional second vector

Angles are measured counterclockwise from the rightward horizontal, in degrees or radians, from −360° to 360°. Values can be in any unit, such as N or m/s, as long as every entry uses the same one, or in m, km, ft or mi with conversion between them. Components can be negative, and a magnitude cannot. The direction in each result is given from −180° to 180°.

Vertical and Horizontal Component Formulas

Vc = M × sin(a)
Hc = M × cos(a) [1]
VcVertical component, the y-component
HcHorizontal component, the x-component
MMagnitude of the vector
aAngle of the vector, counterclockwise from the positive horizontal axis

The two components and the vector form a right triangle with the vector as the hypotenuse, which is where the sine and cosine come from [1]. The formulas work for any vector quantity, including force, velocity, displacement and acceleration, and the components carry the same unit as the magnitude.

Horizontal & vertical components

The main formulas apply directly. A velocity of 500 m/s at 30° has a vertical component of 500 × sin(30°) = 250 m/s and a horizontal component of 500 × cos(30°) = 433.01 m/s. The signs follow the angle: a vector of 10 at 120° points up and to the left, so its horizontal component is −5 and its vertical component is 8.66. At −83°, a magnitude of 480 gives 58.50 horizontal and −476.42 vertical.

Vertical component and angle

M = Vc ÷ sin(a)

A vertical component of 250 at 30° means a magnitude of 250 ÷ 0.5 = 500, and the horizontal component follows as 433.01. This has no answer at 0° or 180°, where the sine is zero.

Horizontal component and angle

M = Hc ÷ cos(a)

A horizontal component of 40 at 60° means a magnitude of 40 ÷ 0.5 = 80 and a vertical component of 69.28. This has no answer at 90° or 270°, where the cosine is zero.

Both components → magnitude and angle

M = √(Hc² + Vc²) [1]
a = atan2(Vc, Hc)

The magnitude comes from the Pythagorean theorem [1]: components of 3 and 4 give √(9 + 16) = 5 at 53.13°. The angle uses the signs of both components to land in the right quadrant, which a plain inverse tangent of Vc ÷ Hc does not. With Hc = −20 and Vc = −42, the magnitude is 46.52 and the angle is −115.46°, which is the same direction as 244.54°. With Hc = −25 and Vc = 15, the result is 29.15 at 149.04°.

Resultant of one or two vectors

Rx = H1 + H2
Ry = V1 + V2 [2]

Each vector is broken into its components, the horizontal components are added together and the vertical components are added together [2]. The sums are then turned back into a magnitude and an angle with the formulas above. Two vectors of 10, one at 0° and one at 90°, add to 14.14 at 45°. A vector of 5 at 30° plus a vector of 8 at 120° gives components of 0.33 and 9.43, which is 9.43 at 87.99°. The resultant is not the sum of the two magnitudes unless the vectors point the same way.

Limits of This Estimate

  • The angle has to be measured counterclockwise from the positive horizontal axis. An angle given from the vertical, or as a compass bearing, has to be converted first, or the two components come out swapped or with the wrong sign.
  • The calculator works in two dimensions. A vector in space has a third component that these formulas do not give [1].
  • A zero vector has no direction, so the angle is reported as undefined when both components are zero or two vectors cancel.

Sources

  1. NASA Glenn Research Center, Vector Components: component formulas, magnitude from components, three dimensions
  2. NASA Glenn Research Center, Vector Addition: adding two vectors by their components