Roof, stair, deck and structure calculators
Roof pitch and roofing, stairs, balusters, decks, fences, retaining walls, lumber and beams, with the rules behind each.
Roofs, stairs, decks and railings follow geometry and building rules that are easy to get wrong by a small amount that adds up. These calculators work from your measurements and show the numbers you need to buy and to mark out.
They are for planning and estimating. Building codes differ by place, and anything structural, such as beams, decks and retaining walls, should be checked by an engineer or local building office.
Which tool do I need?
Start from your question.
- What is the pitch and angle of my roof?Roof Pitch Calculator. Pitch, angle, slope and rafter length from rise and run.
- How many shingle bundles do I need?Roofing Calculator. Roof area, squares and bundles from the building size and pitch.
- How do I design a staircase?Stair Calculator. Number of steps, riser height, tread depth, run and stringer length.
- How many balusters do I need for a railing?Baluster Spacing Calculator. Count and even gap.
- How much lumber does a deck need?Deck Calculator. Boards, joists, beams, posts, footings and screws.
- How many posts and panels for a fence?Fence Calculator. Posts, panels or pickets, rails and gates.
- How many blocks for a retaining wall?Retaining Wall Calculator. Blocks, caps, gravel base and drainage stone.
- How many board feet of lumber?Board Foot Calculator. Board feet, cubic feet and cost.
- How much does a metal plate or bar weigh?Metal Weight Calculator. Plate, bar, pipe, tube and angle.
- Will this beam be strong enough?Beam Calculator. Reactions, shear, moment, stress and deflection.
Roof pitch, angle and area
Roof pitch is written as rise over run, in inches of rise for every 12 inches of horizontal run. A 6/12 roof rises 6 inches for every 12 inches across, which is an angle of about 26.6 degrees. Steeper roofs shed water faster and have more surface area than the building footprint. The roofing calculator takes the pitch into account, so the roof area is larger than the floor area underneath it. Shingles are sold in bundles, and a roofing square is 100 square feet.
Stairs: rise, run and comfort
The riser is the height of one step and the tread is the depth of the part you stand on. Divide the total rise by the riser height you want to find the number of steps, then adjust so every riser is exactly the same, because uneven steps are a trip hazard. A common comfort rule is that two risers plus one tread should be about 24 to 25 inches. Building codes set a maximum riser and a minimum tread, and in the US residential code the maximum riser is 7¾ inches and the minimum tread is 10 inches. Check your own local code.
Railings, balusters and guards
Balusters must be spaced closely enough that a child cannot get through. The usual rule is that a 4-inch sphere must not pass between them. The baluster calculator finds the number and the even gap for your railing length and baluster width. Guard heights are set by code too, with 36 inches a common minimum for residential decks.
Decks, fences and retaining walls
A deck estimate starts with the area and then adds the joists, beams, posts and footings underneath, whose sizes depend on spans and local code. A fence estimate divides the length by the post spacing and adds the end and gate posts. A retaining wall needs a compacted gravel base and drainage stone behind it, and tall walls need engineering and often a permit.
Lumber, metal and beams
A board foot is a volume of lumber 1 inch thick, 12 inches wide and 12 inches long, which is 144 cubic inches. Board feet = thickness (in) × width (in) × length (ft) ÷ 12. The metal weight tool gives weight from the dimensions and the density of the metal. For beams, the tool shows reactions, maximum bending moment, stress and deflection for a simple span or a cantilever. Floors are often designed so deflection stays within about span ÷ 360. These checks are a first look only, and a structural member should be designed by an engineer.
Roofing
Stairs and railings
Decks, fences and walls
- Deck CalculatorHow many deck boards, joists, beams, posts, footings and screws to buy for a deck of a given size, with an optional cost.
- Fence CalculatorHow many posts, panels or pickets and rails, or chain link fabric, to buy for a fence of a given length, with gates, post concrete and cost.
- Retaining Wall CalculatorCheck a retaining wall for sliding, overturning and bearing, then get blocks, concrete, gravel, rebar and a cost range. IRC/IBC, BCP 2021 and IS 14458 rules, with a permit flag.
Lumber, metal and beams
- Board Foot CalculatorPick the US, Pakistan or India and get board feet or CFT with waste, the cost by species, log scaling, a multi-size tally, a to-scale cut list and a PDF.
- Metal Weight CalculatorThe weight in kilograms and pounds of a metal plate, bar, pipe, tube or angle from its dimensions, length and quantity.
- Beam CalculatorThe reactions, maximum shear, bending moment, bending stress and deflection of a simply supported or cantilever beam.
Terms explained
- Pitch
- Roof steepness as rise per 12 units of run.
- Rise / run
- The vertical and horizontal distance of a slope.
- Rafter
- A sloping beam that supports the roof.
- Roofing square
- 100 square feet of roof.
- Riser / tread
- The height of a step and the depth you stand on.
- Stringer
- The sloping board that supports the steps.
- Baluster
- The upright post in a railing.
- Joist
- A horizontal beam that supports a floor or deck.
- Board foot
- A lumber volume of 144 cubic inches.
- Deflection
- How much a beam bends under load.
Common questions
What is a 6/12 roof pitch in degrees?
About 26.6 degrees. It rises 6 inches for every 12 inches of run.
How do I calculate shingles for a roof?
Find the roof area, which is larger than the floor area because of the slope, divide by 100 for squares and by the squares per bundle. The roofing calculator does it from the building size and pitch.
How do I calculate the number of steps in a staircase?
Divide the total rise by your target riser height and round, then divide the total rise by that number to get the exact riser height. The stair calculator shows the run and stringer length too.
What is the maximum riser height?
It depends on local code. In the US residential code it is 7¾ inches, with a minimum tread of 10 inches. Check your own rules.
How far apart can balusters be?
The common rule is that a 4-inch sphere must not pass through any gap. The calculator finds an even gap under that limit.
How do I calculate board feet?
Multiply thickness in inches by width in inches by length in feet and divide by 12.
Can I rely on the beam calculator for design?
It is a first check of the numbers. Structural design needs an engineer and local code.
Do I need a permit for a deck or retaining wall?
Often yes, especially for raised decks and taller walls. Ask your local building office before you start.