Rafter calculator
Give it a building’s width and length and the pitch you want. It frames a gable roof over it, rafter by rafter, and lists every board with its length.
Create an account to print and save what you build.
Building…
- Roof angle
- 26.6°
- Ridge
- 20 ft long
| Piece | Size | Length | How many |
|---|---|---|---|
| Rafter | 2×6 | 10 ft 7/16 in | 22 |
| Ridge board | 2×6 | 10 ft 11 1/2 in | 2 |
| Barge rafter | 2×6 | 10 ft 7/16 in | 4 |
| Lookout | 2×6 | 1 ft 7 1/2 in | 12 |
| Lookout | 2×6 | 9 11/16 in | 4 |
| Lookout | 2×6 | 9 3/16 in | 4 |
| Corner rafter | 2×6 | 2 ft 10 3/16 in | 4 |
| Sub-fascia | 2×6 | 10 ft 10 7/16 in | 4 |
| Top plate | 2×4 | 8 ft 5 5/8 in | 8 |
| Stud | 2×4 | 4 5/8 in to 3 ft 8 5/8 in | 44 |
In all 2×4: 153 ft · 2×6: 364 ft
How it is worked out
- Rafters run from each wall up to a ridge board along the peak, no further apart than the spacing you choose. The first stands just inside each end wall.
- Each rafter is notched to sit on the 2×4 plate on top of its wall, and runs on past the wall to the overhang.
- A sub-fascia closes the rafters’ ends along each eave. A barge rafter runs up each rake, carried on lookouts from the first rafter inside the wall.
- Each outside corner of the eaves has a short rafter at 45° from the corner in to the first rafter it meets.
- The gable ends are framed up to the roof in studs under a plate that follows the slope.
- Boards come up to 20 ft long. A rafter that would need to be longer, with no wall or beam under it to joint it over, is turned down, and we say why.
We lay out and count the sizes you pick, close enough to plan a weekend and price the lumber. Span tables, your local code and, on a bigger job, an engineer settle what size each board has to be.
Questions
- How long is a rafter?
- It depends on the half-width of the building, the pitch and the overhang. The list gives each rafter’s length as it is cut, from the ridge board to the end of the overhang.
- Does it cut the birdsmouth?
- Yes. Each rafter is drawn notched over the plate it sits on, and its length is measured with the notch in it.
- Can it frame a hip roof?
- It frames roofs whose shape is the same all the way along, such as gables, sheds, gambrels and saltboxes. A hip roof falls outside that.
Other calculators

Wall framing calculator
A length, a height, and where the doors and windows go. The studs, plates and headers, laid out.Open the wall framing calculator
Stair calculator
The height to climb and the room you have. Risers, treads and stringers that fit.Open the stair calculator
Deck framing calculator
An outline and a height off the ground. Footings, posts, beams, joists and planks.Open the deck framing calculator
Roof truss calculator
A building’s width and length, and a pitch. Every truss, with its chords and webs.Open the roof truss calculator
Shed roof calculator
A width, a length and a pitch. One slope of rafters and the tall wall under it.Open the shed roof calculator
Gambrel roof calculator
A width, a length and its two pitches. Both slopes’ rafters, each side.Open the gambrel roof calculator
Saltbox roof calculator
A width, a length and where the ridge sits. A short steep slope and a long shallow one.Open the saltbox roof calculator
Floor joist calculator
A floor’s width and length. Joists, rim boards and the subfloor.Open the floor joist calculator
Fence calculator
A length, a height and a gate. Posts, rails and boards, counted.Open the fence calculator
Plant spacing calculator
A bed’s size, a plant and how far apart. Every plant in its place, counted, and the mulch to cover the bed.Open the plant spacing calculator
Vegetables
Tomato24 in apart
Bell pepper15 in apart
Jalapeño15 in apart
Cucumber12 in apart
Zucchini24 in apart
Lettuce6 in apart
Carrot3 in apart
Green bean4 in apart
Pole bean6 in apart
Pea3 in apart
Radish3 in apart
Onion4 in apart
Garlic6 in apart
Potato12 in apart
Sweet corn15 in apart
Spinach4 in apart
Kale15 in apart
Broccoli15 in apart
Cabbage15 in apart
Cauliflower15 in apart
Beet4 in apart
Eggplant18 in apart
Pumpkin36 in apart
Butternut squash36 in apart
Sweet potato12 in apart
Swiss chard8 in apart
Okra15 in apart
Celery8 in apart
Brussels sprouts18 in apart
Asparagus18 in apart
Leek4 in apart
Rhubarb36 in apart
Herbs
Basil12 in apart
Parsley6 in apart
Cilantro6 in apart
Mint12 in apart
Rosemary24 in apart
Thyme6 in apart
Oregano12 in apart
Chives4 in apart
Dill12 in apart
Sage18 in apart
Lavender18 in apart






