HomeConstruction & Home › Roof Pitch Calculator

Roof Pitch Calculator

Converts a roof slope given as rise and run, or as an angle, into the pitch expressed in rise per 12 units of run, the angle in degrees, the slope in percent and the rafter length multiplier (rafter length per unit of horizontal run).

When to use

You need to convert between roof pitch notations (x:12, degrees, percent) or estimate rafter length from the horizontal run.

Do not use when: You need a general right-triangle solution with all sides (use right-triangle) or a plain angle unit conversion (use angle).

Formula

pitch_per_12 = 12 × rise / run; angle = atan(rise / run); slope_percent = 100 × rise / run; rafter_multiplier = √(1 + (rise/run)²); rafter_length = horizontal_run_length × rafter_multiplier. From an angle: rise/run = tan(angle).

Inputs

ParameterTypeUnitRequiredDescription
risenumbernoVertical rise over the given run (any length unit, same as run). Give rise + run, or angle_degrees. Range: ≥ 0, ≤ 1000000
runnumberdefault 12Horizontal run over which the rise is measured (same unit as rise). With the default 12, rise is directly the pitch numerator (e.g. 4 → 4:12). Range: > 0, ≤ 1000000
angle_degreesnumber°noRoof angle from horizontal in degrees; used only when rise is not given. Range: ≥ 0
horizontal_run_lengthnumbernoOptional horizontal distance the rafter spans (e.g. half the building width for a gable roof), any unit; returns the rafter length in the same unit (excluding overhang). Range: > 0

Outputs

OutputTypeUnitDescription
pitch_per_12numberRise for 12 units of run (US pitch notation).
pitchstringPitch written as rise:12.
angle_degreesnumber°atan(rise / run) in degrees.
slope_percentnumber%100 × rise / run.
rafter_multipliernumber√(rise² + run²) / run = 1 / cos(angle); multiply the horizontal run by this to get the rafter length.
rafter_lengthnumberhorizontal_run_length × rafter_multiplier (same unit as horizontal_run_length); only when given.

Example

3:12 pitch, 5 m horizontal run: {"rise":3,"run":12,"horizontal_run_length":5}{"pitch_per_12":3,"pitch":"3:12","angle_degrees":14.04,"slope_percent":25,"rafter_multiplier":1.0308,"rafter_length":5.154}

30° roof: {"angle_degrees":30}{"pitch_per_12":6.93,"pitch":"6.93:12","angle_degrees":30,"slope_percent":57.74,"rafter_multiplier":1.1547}

GET https://tttkmbb.com/api/v1/calculate/roof-pitch?rise=3&run=12&horizontal_run_length=5

Machine access

Sources

FAQ

What is a 4:12 pitch in degrees?

atan(4/12) = 18.43°, a slope of 33.3 %. Pitches below 2:12 (9.5°) are considered low-slope and usually need membrane rather than shingle roofing.

Is pitch the same as slope?

In US practice 'pitch' means rise per 12 in of run (e.g. 6:12); historically pitch was rise over the full span (6:12 = 1/4 pitch). Slope in percent is 100 × rise/run.

Does rafter_length include the overhang or the ridge board?

No. It is the sloped length over the horizontal run you enter; add the eave overhang and subtract half the ridge-board thickness when cutting rafters.

Related calculators