DIY Shed Cost Calculator

Estimate a shed’s rafter length, areas and material cost from its size.

Three roof types, five length units, five area units and 20 currencies.

Updated October 20, 2026
Frank Zhao - Creator
CreatorFrank Zhao
Loading calculator…

Overview

This page turns a shed you have only described into the numbers you actually buy material with: how long each rafter has to be, how much floor, wall and roof area you are covering, and what those three areas cost at prices you supply. It is built for people pricing a garden shed, a lean-to against a wall, or a small storage building before they order anything.

What you get back

  • The rafter length along its slope, overhang included.
  • Floor area, wall area and the sloped roof area.
  • A separate cost for the slab or floor, the walls and the roofing.
  • Their sum, shown in whichever currency you pick for the total.

Those results are read-only on purpose. You cannot type into the rafter length, an area or a cost, so the page will never quietly reshape your shed to fit a budget. You change a dimension, the quantities and the money follow — which is the direction you want when the shed is real and the budget is the thing being checked.

What it does not include

Doors, windows, hardware, fixings, paint, delivery and labour are outside the three areas, and the wall area has no deduction for openings. The figures are geometric quantities priced at your rates.

How to use this calculator

Start with the shape of the roof, then fill in the shed as you would describe it to someone standing next to it. Lengths can be entered in centimetres, metres, inches, feet or yards, and each box keeps its own unit.

1

Choose the roof type first

Slanted is a single slope, the usual choice for a lean-to. Gable rises to a ridge in the middle. Flat has no rise at all. The choice decides whether the rise box appears and how the walls and the roof surface are counted.

2

Enter the width and the length

Width is the span the rafters cross, from one eave wall to the other. Length runs along the ridge or along the slope. If your shed is longer than it is wide, the width is still the short side — that is the direction the roof spans.

3

Add the wall height

This is the height of the wall plate: the top of the wall where the roof starts, not the height at the ridge. The rise is counted separately in the next box, so entering the overall height here would count it twice.

4

Enter the roof rise

Measure from the wall plate straight up to the highest point of the roof. A slanted roof rises across the full width; a gable roof rises from the eaves to the ridge. The box disappears for a flat roof, which stores a rise of zero instead.

For a slanted or gable roof, leave this empty and the rafter, wall area and roof area stay blank. Only the floor area can be worked out without it.

5

Set the overhang

The horizontal distance the roof sticks out past the walls on each side. Any value from zero up to two feet (0.6096 m) is accepted; that ceiling belongs to this calculator and is not a statement about what your roof should have.

6

Read the rafter and the areas

The rafter length, floor area, wall area and roof area are worked out as soon as their inputs are complete, so you can read the quantities before you think about money. The worked example below follows one shed from dimensions to invoice.

7

Price the three areas

Each price has its own area denominator — per square metre, square foot, square yard, square inch or square centimetre — and its own currency. A price only affects its own cost box. The total appears once all three prices are in.

A worked example: a 1.5 m × 2.0 m lean-to

A slanted roof over a shed 1.5 m wide and 2.0 m long, with 2.4 m walls, a 0.6 m rise and a 0.4 m overhang. Prices are 10 for the slab, 5 for the walls and 8 for the roofing, all per square metre.

Floor area

Af=L×WA_{\mathrm{f}} = L \times W==2.0×1.52.0 \times 1.5==3.0 m23.0\ \mathrm{m^2}

Wall area, including the wall the rise adds

Aw=A_{\mathrm{w}} =2(1.5+2.0)(2.4)2(1.5 + 2.0)(2.4)++1.5×0.61.5 \times 0.6==16.8+0.916.8 + 0.9==17.7 m217.7\ \mathrm{m^2}

Rafter length along the slope

S=S =2.32+0.922\sqrt{2.3^{2} + 0.92^{2}}==5.29+0.8464\sqrt{5.29 + 0.8464}==2.47718 m2.47718\ \mathrm{m}

Roof area

Ar=A_{\mathrm{r}} =2.4771758×1×2.82.4771758 \times 1 \times 2.8==6.93609 m26.93609\ \mathrm{m^2}

The area is worked out from the rafter’s full value rather than its rounded display, which is why the visible 2.47718 m would give 6.93610 m² if you multiplied it by hand while the box shows 6.93609 m².

Material cost

3×103 \times 10++17.7×517.7 \times 5++6.93609×86.93609 \times 8==30+88.5+55.4930 + 88.5 + 55.49==173.99173.99

The page shows those same numbers: 3 m² of floor, 17.7 m² of wall, a 2.47718 m rafter, 6.93609 m² of roof, and 30, 88.5 and 55.49 for the three parts, so 173.99 in total.

How the calculation works

Four short steps produce every number on the page. They use the shed’s width W\ W(the span the rafters cross), its length L\ Lalong the ridge, the wall height H\ Hat the wall plate, the roof rise R\ Rand the overhang O\ Oon each side.

Floor area

Af=L×WA_{\mathrm{f}} = L \times W

The footprint inside the walls. The overhang does not enlarge it, and neither does the roof pitch.

Wall area, including the rise

Aw=2(L+W)H+W×R×cA_{\mathrm{w}} = 2(L + W)H + W \times R \times c

The first term is the four walls up to the wall plate. The second is the extra wall the roof creates above it, which is why a sloped shed has more wall than 2(L+W)H\ 2(L + W)Halone: a gable adds two triangular ends, a single slope adds a right-angled triangle to each end wall, and either way the area added is exactly W×R\ W \times R. The constant c\ cis 1 for a slanted or gable roof and 0 for a flat one, where that extra wall does not exist.

Rafter length

S=Srun2+Srise2S = \sqrt{S_{\mathrm{run}}^{2} + S_{\mathrm{rise}}^{2}}

A rafter is the hypotenuse of the distance it runs and the height it climbs. Both are read straight off your dimensions:

Srun=W+2OtS_{\mathrm{run}} = \frac{W + 2O}{t}Srise=c R(1+2OW)S_{\mathrm{rise}} = c\,R\left(1 + \frac{2O}{W}\right)

The run adds the overhang at both ends and, for a gable, is halved because the span is split at the ridge. The rise is the pitch carried along that whole run, so an eave adds height as well as length to the rafter: the roof keeps climbing past the wall. The constant t\ tis 1 for slanted and flat roofs and 2 for a gable. With a flat roof c=0\ c = 0, so the rise term disappears and the rafter is simply the run.

Roof area

Ar=S×t×(L+2O)A_{\mathrm{r}} = S \times t \times (L + 2O)

One rafter length multiplied by the number of rafter runs across the width, and by the roof’s length with the overhang added at both ends. For a gable, t=2\ t = 2counts both slopes, so the ridge is covered rather than counted once.

Cost, and the total

C=P×A,Ctotal=Cf+Cw+CrC = P \times A,\qquad C_{\mathrm{total}} = C_{\mathrm{f}} + C_{\mathrm{w}} + C_{\mathrm{r}}

Each price is multiplied by its own area. A price quoted per square foot is converted to the same basis as the area before the multiplication, so a square-foot price and a square-metre area still give a correct cost. The three costs are each shown in the currency their own menu is set to, and the exchange rates behind those menus are refreshed every 24 hours.

There is no reverse direction. Nothing on the page solves for a width, a rise or a price from an area or a total; change an input and everything downstream is recalculated.

The three roof shapes

The roof type is not a label — it changes the wall area, the rafter you cut and the roof surface you pay for. The table below puts the same shed under all three roofs: 1.5 m wide, 2.0 m long, 2.4 m walls, a 0.6 m rise and a 0.4 m overhang, with the same three prices of 10, 5 and 8 per square metre.

RoofWall areaRafterRoof areaTotal
Slanted17.7 m²2.47718 m6.93609 m²173.99
Flat16.8 m²2.3 m6.44 m²165.52
Gable17.7 m²1.47272 m8.24722 m²184.48
  • Walls: slanted and gable come out at the same 17.7 m² because both add exactly W×R=0.9 m2\ W \times R = 0.9\ \mathrm{m^2}of wall. The flat roof has no rise, so it keeps only the four walls at 16.8 m².
  • Rafters: the flat rafter is simply the run at 2.3 m. The slanted rafter climbs the whole span and reaches 2.47718 m. The gable rafter spans half the width at 1.47272 m, and a pair of them needs 2.94544 m of timber against the slanted roof’s 2.47718 m for the same span.
  • Roofing: the gable covers 8.24722 m², about 19% more than the slanted roof, because both slopes are counted. That is the price of turning one slope into two.
  • Total: on this shed the flat roof is about 8 less than the slanted one and the gable about 10 more — small differences here, but they scale with the shed and with the roofing price you enter.

The rise you can use is limited by the shape you pick. A gable spreads the rise over two shorter rafters instead of one long one, and a flat roof uses none of it at all — so decide the shape before you shop for rafters.

Buying material from these numbers

The overhang is not a detail

Take the same slanted shed down to a zero overhang and the rafter drops from 2.47718 m to 1.61555 m while the roof area falls from 6.93609 m² to 3.2311 m². On a small shed the eaves account for more than half of the roof area you buy, so settle the overhang before you order.

Watch the price denominator

A square metre holds about 10.76 square feet, so 8 entered per square foot is roughly 86 per square metre. Check the denominator menu next to the price before you trust the result, especially when you copy a figure from a supplier’s list.

Openings are counted as wall

The wall area is the full face, with no deduction for a door or a window. Enter your prices against the full area if you want a cautious figure, or subtract the openings yourself and keep the difference as cutting allowance.

A rafter length is a cutting length

The number is the sloping length from the wall plate to the eaves edge, including the overhang, with no allowance for a ridge joint, a notch or a plumb cut. Compare it with your plan and the stock lengths your supplier sells before you cut anything.

Where to go next

If the shed sits on a concrete slab, the floor area plus a slab depth is a volume, and the Square Feet to Cubic Yards Calculator converts that footprint and depth into cubic yards of concrete.

When you price the rafters by volume instead of by area, the Board Foot Calculator takes a rafter’s thickness, width and length and returns board feet and a cost.

Frequently asked questions

Q

Do I type the shed’s total height or just the wall height?

Just the wall height — the top of the wall plate where the roof begins. The rise is a separate box, and the calculator adds it to the walls and to the rafter itself. If you have measured the height to the ridge, subtract the rise before entering the wall height, or the roof will be counted twice.

Q

Does the overhang change the floor or wall area?

No. Floor area is width times length and the walls stand on that footprint, so the eaves leave both unchanged. The overhang only lengthens the rafter along its slope and widens the roof surface on all four sides.

Q

Can I start from a budget and work out a shed size?

Not here. The rafter length, the areas and the costs are results, and the page is built to price a shed you have already described rather than to fit one to a figure. If a budget is your starting point, adjust the width, length or one of the prices and watch the total until it lands where you need it.

Limitations and assumptions

  • An estimate, not a quote. Prices are the ones you type, and local rates for slab, cladding and roofing vary widely. Treat the total as a planning figure and confirm it with real quotes.
  • Three parts are priced, nothing else. The total is the slab, the walls and the roofing at your rates, so it is a material figure rather than a project budget.
  • Simple roof planes. The roof is treated as flat sloping surfaces. Ridge caps, sheet overlaps, battens, fascia and gutters are outside the model, so the roofing you actually buy is usually a little more than the area shown.
  • Rafter length is geometry, not sizing. The page gives you the sloping length to cut. It does not choose a timber size or check span, grade, snow or wind loads — those are structural decisions for a qualified person and your local rules.
  • Two feet is the calculator’s own limit. The overhang ceiling of 0.6096 m (2 ft) keeps the input usable; it is not a recommendation, a code value or a structural opinion.
  • Local rules apply. Size, height, siting and permit requirements differ by area and by how the shed is used. Check the current rules that apply to your property before building.
  • Rounded for reading. Areas are rounded to a few decimals and money to two, so a supplier’s invoice can differ by small amounts from the figures here.
DIY Shed Cost Calculator - Floor, Wall and Roofing Estimate