Arte SheetsLearn. Try. Understand.

Math

COS function: calculate horizontal run from sloped distance and angle

Project sloped survey or rafter lengths onto the horizontal ground plane with COS(RADIANS(angle)), and round floating-point noise at 90 degrees.

Convert degrees to radians before calling COS

In right-triangle geometry, horizontal run equals sloped_length * cos(theta). Because COS(number) expects theta in radians, passing 60 directly evaluates 60 radians (-0.9524) instead of 60 degrees (0.5).

Pairing COS(RADIANS(B2)) converts degrees first: a 12-meter rafter pitched at 60° spans 12 * 0.5 = 6 meters horizontally.

Sloped Length m (A)Pitch Degrees (B)COS(RADIANS(B))Horizontal Run m
12600.56
120112 (flat)
12900 (rounded)0 (vertical)
12120-0.5-6 (opposite heading)

Calculate horizontal run across pitch angles

Wrapping the projection in ROUND(..., 4) keeps plans clean while preserving sub-millimeter precision.

=ROUND(A2 * COS(RADIANS(B2)), 4)

Why COS(RADIANS(90)) needs rounding

Because binary floating-point cannot represent pi/2 with infinite precision, raw COS(RADIANS(90)) returns roughly 6.12E-17 in spreadsheets rather than exact 0. Rounding to 6 decimal places yields clean 0.

=ROUND(COS(RADIANS(B3)), 6)

Try the example

Use the original values or change them to test your understanding.

Further reading