Construction, Carpentry & Concrete Roofing & Rafters Equal-pitch hip and valley geometry

Hip & Valley Rafter Length Calculator

Give this calculator the common rafter run and the roof pitch and it returns everything you need to cut a hip or a valley: the theoretical rafter length from the building corner to the ridge centreline, the length after the overhang is added and the ridge shortening taken off, the plumb cut angle, the double cheek cut angle, and the common difference between successive jack rafters. It works on the same geometry as the framing square's 17-inch rule, and it prints a full jack rafter schedule so the crew can cut the whole stack in one pass.

Calculator

This calculator runs in your browser. Enable JavaScript for live results — the inputs, formula and worked example below remain fully readable without it.

Inputs this calculator takes, with typical values
InputWhat to enterExample
Common rafter runHalf the building width for a symmetrical roof — measured horizontally from the outside of the wall to the ridge centreline.12 ft
Roof pitch (rise per 12 in of run)The rise in inches for every 12 inches of horizontal run — a 6/12 roof gets 6 here.6 in / 12
Jack rafter spacingOn-centre spacing of the jacks along the wall plate — normally 12, 16, 19.2 or 24 inches.16 in
Horizontal overhangThe eave projection measured horizontally from the outside face of the wall, as a common rafter would carry it.12 in
Hip / valley rafter thicknessActual thickness of the hip member — used to shorten each jack rafter where it lands on the hip's cheek.1.5 in
Ridge board thicknessActual thickness of the ridge — set it to zero if you want the theoretical length to the ridge centreline.1.5 in

It returns

  • Hip / valley length (theoretical) — Along the rafter, from the building corner to the ridge centreline. No overhang, no shortening.
  • Length to cut — Theoretical length plus the hip's share of the overhang, less half the 45° thickness of the ridge.
  • Hip plumb cut angle — Measured from square across the rafter. It equals the hip's own slope from horizontal, which is always flatter than the common rafter's.
  • Hip cheek (side) cut angle — From square, on the top edge. The hip takes this bevel on both cheeks at the ridge.
  • Jack rafter common difference — Length change from one jack to the next, measured along the rafter.
  • Jack cheek (side) cut angle — From square, on the top edge of the jack where it meets the hip.
  • Jack rafters per hip side

The formula

L=R2+(x12)2
d=s144+x212
A=arctan(144+x212)

In plain text: L = R · √(2 + (x/12)²) — equivalently L = R × √(288 + x²) / 12

  • LHip or valley rafter length, corner to ridge centreline (same as R)
  • RCommon rafter run — horizontal, outside of wall to ridge centreline (ft or in)
  • xRoof pitch: rise in inches per 12 inches of run (in / 12)

The hip's horizontal run is R√2 because it bisects a 90° corner. Its rise is the same as the common rafter's, which is why the hip is always longer and always flatter than the common.

Updated Category Roofing & Rafters Verified against published test cases Reading time 14 min

Why a hip rafter uses 17 where a common rafter uses 12

A hip rafter runs diagonally up the outside corner where two roof planes meet; a valley rafter runs down the inside corner where they meet. On an equal-pitch roof both sit at exactly 45° in plan, and that single fact drives every number on this page.

Walk out one foot of run on a common rafter and you have moved 12 inches horizontally. Walk out the same amount of rise on the hip and you have moved 12√2 = 16.97 inches horizontally, because the hip is travelling along the diagonal of a 12-inch square. Carpenters round that to 17, and it is why the framing square's hip and valley tables are read against 17 on the blade rather than 12.

The consequences follow immediately. The hip is longer than the common rafter serving the same corner, because it covers more horizontal distance for the same rise. It is also flatter: a 6/12 common rafter sits at 26.57° from horizontal, while its hip sits at 19.47°. And because the hip is flatter, its plumb cut is a shallower angle and its cheek cuts are closer to a plain 45° than the jack rafters' are.

A valley rafter obeys the same arithmetic with the sign of the corner reversed. Every length, angle and difference this calculator returns applies unchanged to a valley of the same pitch and run.

The formula, term by term

Start with the right triangle the hip actually lives in. Its horizontal leg is the hip run R√2, its vertical leg is the total rise R·x/12, and the hip itself is the hypotenuse.

Hip length. L = √( (R√2)² + (Rx/12)² ) = R√(2 + (x/12)²). Multiply out by 12 and you get the working form: L = R × √(288 + x²) / 12, where √(288 + x²) is the unit hip length — inches of hip per 12 inches of common run. At 6/12 it is exactly 18.000, which is why a 6/12 hip is one of the few roofs that comes out in whole inches.

Hip slope angle. arctan(x / 16.97). This is the angle from horizontal, and it is also the angle you mark from square when you scribe the plumb cut across the hip's face.

Cheek cut angle. Where the hip dies into the ridge it needs a double cheek cut, each face at 45° in plan. Because the rafter is tilted, a 45° plan angle does not appear as 45° on the timber: the along-the-rafter direction is foreshortened by cosθ when you look at it from above, so the cut you actually mark is A = arctan(1/cosθ). Written with the unit lengths it is arctan(√(288+x²) / 16.97) for the hip and arctan(√(144+x²) / 12) for a jack. Both are always greater than 45°, and both approach 45° only as the pitch approaches flat.

Jack common difference. Jacks are spaced s apart along the plate. Each step of s in run adds s·√(144+x²)/12 of rafter length, and that increment never changes — which is why a stack of jacks can be cut as an arithmetic progression rather than measured one at a time.

Shortening. The theoretical hip runs to the ridge centreline. The real one stops at the ridge face, so you take off half the ridge's 45° thickness measured along the hip. Each jack stops at the hip's cheek, so you take off half the hip's 45° thickness measured along the jack.

Worked example: a 6/12 hip on a 12 ft run

A hip roof over a building whose common rafter run is 12 ft, pitched 6 in 12, with jacks at 16 in on centre, a 24 in horizontal overhang, a 1½ in ridge and a 1½ in hip.

  1. Rise. 12 ft × 6/12 = 6 ft = 72 in.
  2. Hip run. 144 in × √2 = 203.647 in.
  3. Unit hip length. √(288 + 6²) = √324 = 18.000 in per foot of common run.
  4. Theoretical hip length. 12 ft × 18.000 = 216.000 in, or 18 ft 0 in. Check it the long way: √(203.647² + 72²) = √(41,472 + 5,184) = √46,656 = 216.000. Exact.
  5. Overhang along the hip. 24 in × 18.000 ÷ 12 = 36.000 in.
  6. Ridge shortening. 1.5 × 18.000 ÷ 24 = 1.125 in.
  7. Length to cut. 216.000 + 36.000 − 1.125 = 250.875 in = 20 ft 10⅞ in.
  8. Plumb cut. arctan(6 ÷ 16.971) = 19.47° from square. On the framing square: 17 on the blade, 6 on the tongue.
  9. Cheek cuts. arctan(18.000 ÷ 16.971) = 46.69° from square, taken on both faces at the ridge.
  10. Jack common difference. 16 × √(144+36) ÷ 12 = 16 × 13.4164 ÷ 12 = 17.889 in, near enough 17⅞ in.
  11. Jack cheek cut. arctan(13.4164 ÷ 12) = 48.19° from square. Framing square: 13.42 on the blade, 12 on the tongue, cut along the tongue.
  12. Jack count. 144 ÷ 16 = 9 positions, and the ninth is the common rafter itself, so 8 jacks per side. Their theoretical lengths run 17.889, 35.777, 53.666 … 143.108 in, and each loses 1.5 ÷ √2 × 1.11803 = 1.186 in for the hip's thickness.

Every figure above is derived from the two unit lengths, 13.4164 and 18.000. Fix those first and the rest of the roof is arithmetic.

Reading the angles onto real timber

The plumb cut angle is measured from square, not from the edge. Set a speed square or bevel gauge to 19.47° for the 6/12 hip above and the line you scribe is vertical when the rafter is in place. If your bevel gauge reads from the blade instead, use the complement, 70.53°. Getting this backwards is the fastest way to cut a rafter twice.

Cheek cuts are always steeper than 45°. That surprises people who expect a 45° corner to give a 45° cut. The reason is foreshortening: the rafter is tilted, so its plan projection is compressed along its length and a 45° plan angle opens out on the timber. At 6/12 the jack cheek is 48.19°; at 12/12 it is 54.74°. Both are outside the 45° detent on a standard mitre saw, so on anything but a shallow roof you mark the top edge and cut with a circular saw.

The hip's cheek is always closer to 45° than the jack's. That is not a rule of thumb, it is the algebra: the hip's angle is arctan(√(288+x²)/16.97) and the jack's is arctan(√(144+x²)/12), and the first is smaller at every positive pitch. It gives you a useful self-check — if your hip cheek comes out steeper than your jack cheek, you have swapped 12 and 17 somewhere.

The common difference is a cutting instruction. Cut the longest jack, then chop the common difference off each successive one. On the 6/12 example that is 17⅞ in per jack, and the whole stack of eight comes off one setup. Verify against the schedule the calculator prints before the crew starts, because an error in the common difference multiplies down the whole stack.

Backing or dropping the hip. The hip's top edge is an arris, not a flat, so you either bevel both top edges (backing) or set the whole member lower in the corner (dropping). Neither changes a length or angle on this page, but both change the seat cut — size that with the birdsmouth and HAP calculator.

Unit lengths and cut angles by pitch

Unit common = √(144 + x²) inches per 12 in of run. Unit hip = √(288 + x²) inches per 12 in of common run. Cheek angles are from square, on the top edge. Common difference is at 16 in on centre.
PitchUnit common (in)Unit hip (in)Hip slopeHip cheekJack cheekJack diff @16 in
3/1212.369317.233710.03°45.44°45.87°16.492
4/1212.649117.435613.26°45.77°46.51°16.865
5/1213.000017.691816.42°46.19°47.29°17.333
6/1213.416418.000019.47°46.69°48.19°17.889
7/1213.892418.357622.42°47.25°49.18°18.523
8/1214.422218.761725.24°47.87°50.24°19.230
9/1215.000019.209427.94°48.54°51.34°20.000
10/1215.620519.697730.51°49.25°52.47°20.827
12/1216.970620.784635.26°50.77°54.74°22.627

Two pitches land on round numbers and are worth remembering: 5/12 gives a unit common of exactly 13, and 6/12 gives a unit hip of exactly 18.

Irregular hips break every shortcut here

All of this assumes the two roof planes carry the same pitch and meet at a true 90° corner, so the hip bisects the corner at 45° in plan. That is the normal case, and it is what the 17-inch rule encodes.

On an irregular hip — a steeper pitch on one side, or a corner that is not square — the hip no longer runs at 45°. Its plan angle is set by the requirement that both planes reach the same height at the same point, so the two sides have different runs, different jack spacings measured along the hip, and two different cheek cut angles on the same member. None of the numbers on this page apply. Lay an irregular hip out full size on the deck, or model it, before you cut stock.

Mistakes that cost a hip rafter

  • Measuring the run to the ridge face instead of the centreline. The theoretical length runs to the centreline; the shortening is then applied once. Do both and you have shortened the rafter twice.
  • Using 12 instead of 17 on the framing square. This produces a hip cut at the common rafter's slope. It will not reach the ridge and it will not sit down on the corner.
  • Expecting a 45° cheek cut. The plan angle is 45°; the cut on the timber never is. At 8/12 the jack cheek is 50.24°.
  • Forgetting the hip's overhang is longer than the common's. A 24 in horizontal overhang becomes 36.00 in of hip on a 6/12 roof — the same √2 stretch as the rest of the run.
  • Neglecting to back or drop the hip. Sheathing landing on an unbacked hip rocks on the arris and telegraphs through the roof covering.
  • Applying jack shortening in the wrong direction. Jacks lose length at the hip end and keep their full plumb cut at the plate end. The birdsmouth position does not move.
  • Cutting the whole stack before checking the first jack in place. Dry-fit the longest jack, confirm the cheek angle against the hip, and only then run the common difference down the pile.

Where hip geometry sits in the framing sequence

Establish the pitch first. If you are working from an existing roof rather than a drawing, take it off with a level and a rule and confirm it with the roof pitch calculator. Everything downstream — unit lengths, angles, differences — is a function of that one number.

Cut the common rafters next, using the rafter length calculator, because the hip has to land at the same ridge height they establish. Then cut the hips, then the jacks in descending order. Seat cuts on all three come from the same birdsmouth geometry, and the height above plate has to match across commons, hips and jacks or the roof plane will not be flat.

Once the roof is framed and sheathed, the sloped area you need for a shingle order comes straight out of the same unit common length: multiply the plan area by √(144+x²)/12 and hand the result to the shingle bundle calculator. For the trim that follows — fascia returns, soffit mitres and any moulding that runs up a hip — the compound angles come from the compound mitre angle calculator, which solves the same foreshortening problem for a different pair of planes.

Two related layouts are worth naming. A Dutch hip stops the hips short of the ridge and finishes with a small gable, so the hips are cut to a shorter run but at the same angles. A cripple jack runs between a hip and a valley and touches neither plate nor ridge; its length is the difference between two positions on the schedule, and its two ends take opposite-hand cheek cuts.

Framing terms used here

Run
The horizontal distance a rafter covers. For a common rafter it is half the building width; for a hip it is that run multiplied by √2.
Unit length
Rafter length per 12 inches of run — √(144 + x²) for a common rafter and √(288 + x²) for a hip or valley on the same roof.
Plumb cut
The vertical cut at the ridge or heel end of a rafter. Marked at the rafter's slope angle measured from square across the face.
Cheek cut
The angled side cut where a hip meets a ridge or a jack meets a hip. Also called a side cut. Hips take two; jacks take one.
Jack rafter
A shortened common rafter running from the plate to a hip, or from a valley to the ridge. Successive jacks differ by a constant length.
Common difference
The fixed length change between adjacent jack rafters: spacing × unit common length ÷ 12.
Backing the hip
Bevelling both top edges of a hip so the sheathing on each roof plane bears flat on it instead of on the arris.

Frequently asked questions

Why do carpenters use 17 for a hip rafter?

Because the hip travels 12√2 = 16.97 inches horizontally for every 12 inches the common rafter travels, and 17 is close enough to lay out with. The hip bisects a 90° corner, so its plan direction is the diagonal of a 12-inch square. That is why the framing square's hip and valley table is read against 17 on the blade while the common rafter table is read against 12. This calculator uses 16.9706 rather than 17, which matters on long runs: laying out against a true 17 stretches a 6/12 hip by 0.15%, or 240 × 0.0015 = 0.37 in on a 20 ft member.

Is a valley rafter calculated the same way as a hip?

Yes, identically, as long as both roof planes carry the same pitch. A valley is the inside corner where two planes meet and a hip is the outside corner, but both run at 45° in plan and both have the same rise as the common rafter serving them. Length, slope angle, cheek cut angle and jack common difference are all the same numbers. What differs is which end the jacks attach to and the hand of the cheek cuts.

Why is the cheek cut more than 45 degrees?

Because the rafter is tilted, so a 45° angle in plan opens out on the timber. Looked at from above, the rafter's length is compressed by cos θ, which means a cut line lying at 45° in plan sits at arctan(1/cos θ) measured from square on the actual member. At 6/12 that is 48.19° for a jack and 46.69° for the hip; at 12/12 it is 54.74° and 50.77°. Only a dead-flat roof gives a true 45° cut.

How much do I shorten a hip rafter at the ridge?

By half the ridge's 45° thickness, measured along the hip. For a 1½ in ridge the plan shortening is 1.5 ÷ √2 = 1.061 in, and multiplying by the hip's slope gives 1.5 × √(288 + x²) ÷ 24 along the rafter — 1.125 in on a 6/12 roof. Take it off once, at the ridge end only. The heel end keeps its full length, and the birdsmouth stays where the theoretical run puts it.

How many jack rafters do I need on each side of a hip?

Divide the common run by the jack spacing and subtract one, because the last position is occupied by the common rafter itself. A 12 ft run at 16 in on centre gives 144 ÷ 16 = 9 positions and therefore 8 jacks per hip side. Every hip has two sides, and a standard hip roof has four hips, so that is 8 × 2 × 4 = 64 jacks in total, plus the commons. If the run is shorter than one spacing, there are no jacks at all — just the hip.

What is the common difference and why does it matter?

It is the fixed amount each jack rafter is shorter than the one below it: spacing × √(144 + x²) ÷ 12. At 16 in on centre on a 6/12 roof it is 17.889 in, near enough 17⅞. It matters because it turns the whole stack into a single setup — cut the longest jack, then move your stop by the common difference for each one after. It also gives you a fast error check: if two adjacent jacks do not differ by exactly that amount, one of them is wrong.

Does this work for an unequal-pitch or irregular hip?

No. Everything here assumes the two roof planes carry the same pitch and meet at a square corner, which puts the hip at 45° in plan. On an irregular hip the plan angle is whatever makes both planes reach the same height at the same point, so the two sides have different runs, different jack spacings along the hip and two different cheek cut angles on one member. Lay an irregular hip out full size or model it before cutting.

Should I add the overhang before or after the shortening?

Both operations apply to the same theoretical length and they act at opposite ends, so the order does not change the answer: length to cut = theoretical + overhang along the hip − ridge shortening. The overhang lengthens the tail below the birdsmouth; the shortening trims the ridge end. Note that the hip's overhang is longer than the common rafter's for the same horizontal projection — a 24 in eave becomes 36.00 in of hip on a 6/12 roof.

Do I need to back or drop the hip rafter?

You need one or the other on any hip that is sheathed, because the two roof planes meet along the hip's top edge as a ridge line rather than a flat. Backing means planing a bevel on each top edge so the sheathing bears flat; dropping means setting the whole hip lower in the corner so the arris falls below the roof plane. Dropping is faster and far more common on site. Neither changes the lengths or angles this calculator returns, but both change the seat cut depth at the plate.

References

  • Roof Framing — Craftsman Book Company (Marshall Gross)
  • A Roof Cutter's Secrets to Framing the Custom Home — Journal of Light Construction (Will Holladay)
  • 2021 International Residential Code, Chapter 8 — Roof-Ceiling Construction — International Code Council