Arte SheetsLearn. Try. Understand.

Math

ACOS function: find roof or vector angles from adjacent-over-hypotenuse ratios

Calculate arccosine angles in [0, 180] degrees using DEGREES(ACOS(ratio)), and guard ratios outside [-1, 1].

Recover an unknown pitch angle from horizontal run and rafter length

When you know a rafter's horizontal run (adjacent) and sloped length (hypotenuse), their ratio run / length equals cos(theta). ACOS(number) computes the inverse cosine in radians from 0 to pi (0° to 180°).

Wrapping ACOS in DEGREES converts the output directly into degrees: a 6-meter run under a 12-meter rafter has ratio 0.5 and angle DEGREES(ACOS(6/12)) = 60°.

Cosine RatioACOS (Radians)DEGREES(ACOS(Ratio))
1 (run = length)00° (flat)
0.51.04719860°
01.57079690° (perpendicular)
-0.52.094395120° (obtuse vector angle)

Convert ACOS output to degrees

Unlike ASIN (which returns [-90°, +90°]) and ATAN (strictly between those endpoints for finite inputs), ACOS spans [0°, 180°], making it the standard choice for computing the angle between two vectors via their dot product.

=ROUND(DEGREES(ACOS(A2 / B2)), 2)

Guard ratios outside [-1, 1]

No real triangle has a horizontal run longer than its hypotenuse, so |ratio| > 1 is geometrically invalid. Checking ABS(A2/B2) > 1 catches data-entry swaps before calling ACOS.

These examples assume a strictly positive measured length. Validate that length is greater than zero before dividing; a zero length makes the ratio undefined.

=IF(ABS(A2 / B2) > 1, "Invalid ratio", ROUND(DEGREES(ACOS(A2 / B2)), 2))

Try the example

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

Further reading