This Hip Roof Calculator provides rafter design and material calculation for a rectangular building. It calculates the geometry of a hip roof, roof slope angles and areas, rafter system and batten lengths, and the quantities of selected additional materials. The calculation is based on the actual geometry of all four roof slopes, taking into account roof height, ridge length, and eaves overhangs.
All input linear dimensions are entered in millimetres. Material lengths are shown in metres, roofing and waterproofing areas in m2, and timber and insulation volumes in m3.
Roof plan dimensions. The building dimensions are first increased by the overhang C on both sides. For building length A and width B, the roof plan dimensions are:
Ar = A + 2C
Br = B + 2C
These dimensions define the outer roof outline and are used to calculate roof area, battens, and elements along the eaves.
Ridge length. For standard hip roof geometry, the ridge length is taken as the difference between the longer and shorter building sides:
R = Lmax - Lmin
With this proportion, the horizontal runs of the main roof slopes and the hip slopes are equal, so all four slopes have the same pitch angle. If a different ridge length is specified, it is used when the value is greater than 0, less than the longer building side, and the following condition is satisfied:
H / (Lmax - R) ≤ 5
The horizontal run of a hip slope from the building end to the ridge end is:
D = (Lmax - R) / 2
Main slope angle. For the slopes running along the ridge, the horizontal run equals half of the shorter building side:
α1 = arctan(H / (Lmin / 2))
Hip slope angle. For the end slopes, the distance D is used:
α2 = arctan(H / D)
With the standard ridge length, α1 and α2 are equal. Changing the ridge length changes the hip geometry and may produce different slope angles.
Slope factor. To convert the horizontal projection of a roof slope into its actual inclined area, the following factors are used:
K1 = √((Lmin / 2)2 + H2) / (Lmin / 2)
K2 = √(D2 + H2) / D
The factor represents the ratio between the inclined slope length and its horizontal projection. Increasing the roof height increases both the factor and the actual roof surface area.
Total area of the four slopes. The two main slopes are treated as trapezoidal surfaces, while the two hip slopes are treated as triangular surfaces. The overhang is added to the outer edges of each slope. The resulting formula is:
Sr = ((R + D + C)(Lmin + 2C)K1 + (Lmin + 2C)(D + C)K2) / 1000000
Before division, all linear dimensions in the formula are in millimetres. The result is converted to m2 and rounded upward to 0.1 m2.
Common rafter spacing. The specified spacing is used to arrange rafter groups on each roof slope. The outermost spaces may differ from the entered spacing so the rafters remain symmetrical and a single narrow leftover section is not created at one edge.
Even rafter distribution. If a maximum permitted spacing Smax is specified, the calculator first determines the available length along the longer roof side while accounting for rafter thickness S2:
Lavail = max(Ar, Br) - S2(1 + √2)
The number of spaces is then rounded upward so the actual spacing does not exceed the selected maximum:
N = ceil(Lavail / Smax)
S = floor(Lavail / N)
Rafter lengths. For each element, its horizontal plan length is determined first and then converted into an inclined length using the factor for the corresponding roof slope. An additional geometric correction related to the rafter width S1 is included:
Lraf = ceil(LplanK + S1√(K2 - 1))
Each rafter length is rounded upward to the nearest millimetre. If the main and hip slopes have different pitch angles, the corresponding rafters use different factors K1 and K2.
Hip rafters. The calculator includes four diagonal hip rafters running from the roof corners to the ridge ends. Their horizontal projection without the overhang is calculated first:
G = √((Lmin / 2)2 + D2)
Kh = √(G2 + H2) / G
The full hip rafter length also includes the roof overhang in both horizontal directions:
Lh = ceil(√((Lmin / 2 + C)2 + (D + C)2)Kh + S1√(Kh2 - 1))
Total rafter material. The total length includes common and shortened rafters, four hip rafters, and the ridge element. Timber volume is calculated from the total length and rafter cross-section:
Vraf = Lraf.mm × S1 × S2 / 1000000000
Batten arrangement. The battens are calculated from the actual roof slope geometry. The first row is placed at the eaves, and subsequent rows are positioned using the specified spacing O3. The length of each row follows the hip roof shape at that position, so rows become shorter as they approach the ridge.
First batten spacing. If a separate first spacing is enabled, only the distance between the first and second batten rows uses this value. After the second row, the regular spacing O3 is used again. For some metal tile roofing systems, a first spacing of approximately 280-300 mm is commonly used with a regular spacing of about 350 mm, but the exact value should be taken from the roofing manufacturer's installation instructions.
Row near the ridge. After the regular rows are positioned, the remaining distance is checked. If the free section exceeds the greater of 120 mm or the batten width O1, an additional row is placed closer to the ridge.
Total length and volume. The lengths of all battens are added together. The displayed total length is rounded to the nearest whole metre, while the timber volume is calculated from the original total length in millimetres:
Vbat = Lbat.mm × O1 × O2 / 1000000000
Fascia board. Its length is calculated from the full outer perimeter of the roof including the overhangs:
Lfas = 2(Ar + Br)
The volume is determined by multiplying the length by the specified board width and thickness.
Wall plate. The wall plate calculation uses the building perimeter without the roof overhang. Four wall plate widths are deducted from the total length to account for corner joints:
Lwp = max(0, 2A + 2B - 4Wwp)
The volume is calculated from the wall plate length, width, and thickness.
Counter battens. Their total calculated length is taken as equal to the total calculated length of the rafter system. The volume is calculated from this length together with the counter batten width and thickness.
Total timber volume. The main total always includes the rafter system and battens. Fascia board, wall plate, and counter battens are added when their corresponding calculations are enabled:
Vtotal = Vraf + Vbat + Vfas + Vwp + Vcb
Material area. The calculated roof area Sr is used as the base value. Additional material for overlaps is included in both the roll length and width directions. For roll length Lroll, roll width Wroll, and overlap N, the following relationship is used:
Sw = Sr(1 + N / Wroll + N / Lroll)
The waterproofing area is rounded to 0.1 m2. The calculated number of rolls is then determined from the area of one roll:
Qroll = Sw / (LrollWroll / 1000000)
The resulting value is also used to determine the total length of roll material.
Insulated area. Insulation is calculated from the roof slope geometry above the building outline without the eaves overhang. The area is determined separately for the two main slopes and the two hip slopes:
Sins = ((R + D)LminK1 + LminDK2) / 1000000
Insulation volume. For insulation thickness Tins in millimetres:
Vins = Sins × Tins / 1000
Rafter spacing. Timber pitched roofs often use rafter spacing of around 600 mm. The actual value depends on the span, timber cross-section, insulation layout, and design loads.
Roof overhang. Values of approximately 300-700 mm are common for many low-rise buildings. A larger overhang increases the external roof dimensions, roofing area, fascia board length, and batten consumption.
Waterproofing overlap. Overlaps of around 100-150 mm are common for many roofing membranes. The required overlap depends on the membrane type, roof pitch, and the manufacturer's installation requirements.
Related European standards. Timber member size and spacing are designed according to Eurocode 5 EN 1995-1-1 “Design of timber structures — Part 1-1: General — Common rules and rules for buildings”. Roof loads are determined with reference to Eurocode 1 EN 1991-1-3 “Actions on structures — Part 1-3: General actions — Snow loads” and EN 1991-1-4 “Actions on structures — Part 1-4: General actions — Wind actions”.
Increasing the ridge length reduces the horizontal run of the end hip slopes and makes them steeper when the roof height remains unchanged. Reducing the ridge length increases the hip run. Ridge length therefore affects not only the roof drawing, but also slope angles, rafter lengths, roof area, and batten requirements.
A hip rafter runs diagonally in two horizontal directions at the same time, so its plan projection is longer. The calculator first determines this diagonal projection, then includes roof height and the eaves overhang. Four hip rafters are included, one from each roof corner to a ridge end.
Fixed spacing is useful when rafter positions need to match insulation widths, sheathing modules, or another construction grid. Even distribution is useful when the main requirement is to stay within a specified maximum spacing while distributing the rafters more uniformly across the roof.
A separate first spacing is used for roofing systems where the distance between the first and second batten rows differs from the regular batten spacing. This is common with some metal tile roofing profiles. The correct value depends on the specific roofing product and should normally be taken from the manufacturer's installation layout.
The overhang increases the external roof dimensions and therefore increases the roofing area, batten lengths, hip rafters and other elements in the eaves zone, as well as the fascia board length. The overhang is not added to the insulation calculation because insulation volume is based on the roof geometry above the main building outline.