Arte SheetsLearn. Try. Understand.

Math & Engineering

Cotangent (COT), Cosecant (CSC) & Secant (SEC) Roof Pitch & Optical Formulas

Calculate cotangent, cosecant, and secant from degree or radian angles using exact COS/SIN and 1/SIN identities while guarding 0 and 180 degree singularities.

Use COS(x)/SIN(x) rather than 1/TAN(x) so 90 degrees evaluates cleanly to 0

Structural truss, surveying, and optical Snell-law sheets rely on cotangent cot(theta) = Horizontal Run / Vertical Rise and cosecant csc(theta) = Slant Hypotenuse / Vertical Rise. Defining cot(theta) as COS(RADIANS(deg)) / SIN(RADIANS(deg)) rather than 1 / TAN(RADIANS(deg)) stays well-behaved at 90 degrees (where sin = 1 and cos = 0, giving exact 0).

Because sin(theta) vanishes at integer multiples of 180 degrees (MOD(deg, 180) = 0), guarding MOD(B2, 180) = 0 catches exact cotangent and cosecant vertical asymptotes cleanly instead of leaking #DIV/0!.

Pitch Angle (deg)cot(theta) = cos/sincsc(theta) = 1/sinHorizontal Run (Rise = 4m)Rafter Length (Rise = 4m)
30 deg1.7320512.0000006.9282 m8.0000 m
45 deg1.0000001.4142144.0000 m5.6569 m
90 deg0.0000001.0000000.0000 m4.0000 m
0 or 180 degUndefinedUndefinedSingularity GuardSingularity Guard

Singularity-Safe Cotangent from Angle in Degrees

Guards multiples of 180 degrees and returns cot(B2) rounded to 6 decimals.

=IF(MOD(B2, 180) = 0, "Undefined Singularity", ROUND(COS(RADIANS(B2)) / SIN(RADIANS(B2)), 6))

Rafter Slant Length Using Cosecant (Rise * csc(theta))

Computes slant hypotenuse length B3 / SIN(RADIANS(B2)) for vertical rise B3.

=IF(OR(MOD(B2, 180) = 0, B3 <= 0), "Invalid Angle or Rise", ROUND(B3 / SIN(RADIANS(B2)), 4))

Try the example

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

Further reading