ToolHuts

Practical tools for measured work

Roof Pitch Calculator

Visualize roof pitch as rise/run, degrees and a scaled triangle diagram.

mm
mm
18.4°Rise 1200 mmRun 3600 mmRafter 3795 mm
Pitch4.00 in 12
Angle18.43deg
Rafter3794.7mm
Ratio0.3333

How it works

How to use it: enter rise and run in the same units - rise is the vertical height the roof gains, run is the horizontal distance it covers over that height (for a full roof, run is usually half the building width, to the ridge centerline). Pitch, angle, and rafter length update as you type.

Formula. Pitch ratio is rise divided by run; carpentry "X in 12" notation scales that ratio to a run of 12; angle comes from the inverse tangent; rafter length is the hypotenuse of the rise/run triangle:

Pitch ratio = rise ÷ run, X in 12 = pitch ratio × 12, Angle = atan(rise ÷ run), Rafter length = √(rise² + run²)

Worked example. With the defaults above (1200 mm rise, 3600 mm run): pitch ratio = 1200 ÷ 3600 = 0.3333; in the common notation that's 0.3333 × 12 = 4.00, i.e. a "4 in 12" roof; angle = atan(0.3333) ≈ 18.43°; rafter length = √(1200² + 3600²) = √14,400,000 ≈ 3794.7 mm.

Current-input example

The result above uses these exact values. This snapshot is included when the page is printed so the output can be checked against the original measurements.

Rise
1200 mm
Run
3600 mm

Primary result: Pitch: 4.00 in 12.

Before using the result

  • Measure from the datum or reference edge described by this tool, and do not mix inside, outside and centerline dimensions.
  • Keep inputs in the displayed units and preserve more precision than the final cutting or purchasing tolerance requires.
  • When the result is close to a limit, verify it with a test piece, field measurement, manufacturer drawing or qualified project professional.

Limitations

This is triangle geometry only. The rafter length shown is the theoretical line-length of the rise/run triangle - it does not subtract a ridge-board reduction, add eave or gable overhang, or account for a birdsmouth notch at the wall plate, all of which change the actual lumber length you'd cut.

It also does not size rafters structurally (span tables, snow/wind load, species and grade). Use it for layout and pitch, and have spans checked against your local code or an engineer for anything load-bearing.

Frequently asked questions

What does "4 in 12" mean?

It's carpentry shorthand for the pitch ratio scaled to a 12-unit run: for every 12 units the roof runs horizontally, it rises 4 units. It's unit-independent - 4 in 12 is the same slope whether you measure in millimetres or inches.

Is the rafter length the actual board length I should cut?

No - it's the straight-line hypotenuse between your rise and run points. Real rafters are usually longer (for overhang past the wall) and get a birdsmouth cut and ridge-side trim, so treat this number as the geometric baseline, not a cut list.

How do I find run if I only know the building width?

For a simple gable roof, run is typically half the building width - the horizontal distance from the wall plate to the ridge centerline. Measure to the ridge, not the far wall, if the roof isn't symmetric.