Lumber, roof, span and fastener tables

Rafter Length Calculator

Enter the building width, pitch, overhang and ridge thickness to get the common rafter length along the slope, the length with overhang, the cut angles and a stock length to start from.

Open on FramingDesk

Embed

Embed this tool

Copy this code into your website, blog or class page. The tool runs inside your page.

Please keep the credit link below the tool.

This rafter length calculator works out the common rafter length, the total rafter length with overhang, and the stock board length for a roof built from common rafters and a ridge board. You enter the building width, roof pitch, overhang and ridge board thickness, and the tool does the geometry for you. Dimensions can be entered in feet, inches, centimetres, metres or millimetres. It runs in your browser, is free, and needs no sign-up. The form opens with a 24 ft wide building at 6:12 pitch, so you can see a worked result straight away. Results are calculated from your inputs and cover geometry only. The tool does not check span, spacing or load, and sizes vary by supplier, so check the stock length against what your supplier carries.
Rafter length calculator example

How to use the Rafter Length Calculator

  1. Enter “Building width (span)” and choose its unit: ft, in, cm, m or mm. The default is 24 ft.
  2. Set “Roof pitch (rise in 12)”. Pick a value from 2:12 to 12:12, or choose “Other (type it)” and fill in “Custom pitch (rise in 12)”. The default is 6:12.
  3. Enter “Overhang (horizontal)” as a flat (horizontal) distance, not a length along the slope. The default is 12 in.
  4. Open “More options” and check “Ridge board thickness”. The default is 1½ in. Set it to match your plan.
  5. Read the results. “Common rafter length” is the length along the slope, “Rafter length including overhang” adds the overhang, and “Stock length to start from” is the next even length from 8 to 24 ft that is at least the total. At the defaults the stock length is 16 ft.
  6. Check for warnings. They appear if the pitch is above 24:12, the width is outside 5 to 100 ft, the ridge is thicker than 6 in, the overhang is longer than half the width, or a rafter is longer than 24 ft. A total beyond 24 ft shows “special order”.
  7. Read the note under the result. It explains that sizes vary by supplier.

Change one input at a time to see how each value moves the result. The board must be slightly longer than the centre-line length because of the plumb cut, so start from the stock length rather than the calculated length. Four presets fill in examples, such as “24 ft wide, 6:12”.

How is the common rafter length worked out?

The common rafter is the run multiplied by a length factor for the pitch. The run is half the building width minus half the ridge board thickness, and the length factor is the square root of 1 + (p/12)², where p is the rise for each 12 in of run.

For 6:12 the factor is 1.1180; for 12:12 it is 1.4142. At the defaults the run is 143.25 in (11 ft 11¼ in), so the common rafter is 143.25 × 1.1180 = 13 ft 4-3/16 in (160.2 in). The rise, measured from the top of the wall plate to the centre of the ridge, is half the width times p/12, which is 72 in here.

The overhang is entered as a flat distance and multiplied by the same factor. The 12 in overhang becomes about 13.4 in along the slope, which brings the total to 14 ft 5-9/16 in (173.6 in).

The same factor produces the table of rafter length per 12 in of run, which runs from 13 in at 5:12 to 16.971 in at 12:12. The cut angles follow the pitch as well. At 6:12 the plumb (top) cut is 26.57° off a square cut across the board, and the level (seat) cut is 90° minus that, or 63.43°.

Why is the ridge board thickness subtracted from the run?

The rafter-square manual used as a source says that when a ridge board is used, half its thickness is deducted from the run. The tool takes half the ridge thickness off the run and shows that in its steps.

Sources differ on the method. A forum example and the manual take the ridge deduction horizontally off the run, while another rafter-square manual measures it at right angles to the plumb cut. On steep roofs the two methods give slightly different lengths.

Stock lengths also vary by source. One source lists 2x6 to 2x12 up to 24 ft, while another says 2x8 and 2x10 are usually 8 to 16 ft. The tool steps in 2 ft increments from 8 to 24 ft, so check what your yard stocks.

Worked example: an 8 ft wide building at 5:12, with a 1½ in ridge and no overhang, gives a run of 47.25 in (48 in minus 0.75 in) and a rafter of 51-3/16 in. This matches a published carpentry example.

Sources (checked 15 October 2026): cdn.axminstertools.com · finehomebuilding.com · hunker.com

Worked examples

InputResult
24 ft wide, 6:12 pitchRafter 13' 4-3/16" (160.2 in, 4.07 m), stock 16 ft
28 ft wide, 8:12 pitchRafter 16' 9" (201 in, 5.11 m), stock 20 ft
20 ft wide, 4:12 pitchRafter 10' 5-11/16" (125.7 in, 3.19 m), stock 12 ft
6 m wide, 7.5:12 pitchRafter 11' 6-3/8" (138.4 in, 3.52 m), stock 14 ft

Calculated by the tool above; open it with the same values to see each step.

Frequently asked questions

What is the difference between the common rafter and the total length?

The common rafter is the length along the slope to the ridge, worked from the run after the ridge deduction. The total adds the overhang, multiplied by the same length factor. At the defaults these are 13 ft 4-3/16 in and 14 ft 5-9/16 in.

Why is the stock length longer than the total?

The board must be slightly longer than the centre-line length because of the plumb cut. The tool picks the next even length from 8 to 24 ft that is at least the total. At the defaults that is 16 ft.

What happens if the rafter is longer than 24 ft?

The result says “Longer than 24 ft: special order or a different framing method”, and a warning appears. Stock lengths are listed only up to 24 ft.

Does the calculator check whether my roof is safe?

No. The tool gives geometry only. It does not check span, spacing or load, so ask your local building authority about the rules that apply to your project.

What length is needed for a 16 ft wide building at 9:12?

With no ridge board and a 24 in overhang, the common rafter is 10 ft and the total is 12 ft 6 in. The stock length is 14 ft. The 9:12 pitch is the 3-4-5 triangle, which gives a length factor of 1.25.

Can I type a custom pitch?

Yes. You can type a custom pitch as well as picking one from 2:12 to 12:12. Pitches above 24:12 trigger a warning.