Last updated March 2026

Stair Calculator

Calculate stair dimensions including number of steps, rise per step, total run, stringer length, and stair angle. Checks IRC building code compliance.

Number of Steps 14
Rise per Step 7.71"
Run per Step 10.00"
Total Run 130.00"
Stringer Length 169.00"
Stair Angle 39.7°

How to Calculate Stairs

Calculating stairs correctly is one of the most important tasks in residential and commercial construction. Improperly designed stairs are a leading cause of falls and injuries in buildings, which is why building codes set strict requirements for stair dimensions. Whether you are building interior stairs between floors, deck stairs to your backyard, or basement stairs to a lower level, the process starts with one critical measurement: the total rise.

The total rise is the vertical distance from the finished floor at the bottom of the stairs to the finished floor at the top. This measurement must be precise because every fraction of an inch is divided among all the steps. A measurement error of even half an inch can push your riser height out of code compliance or create an uneven step that becomes a tripping hazard. Always measure the total rise after finished flooring is installed, or account for the thickness of flooring materials that will be added later.

Once you have the total rise, divide it by the ideal riser height of 7.5 inches to determine the number of steps. Round this number to the nearest whole number. Then divide the total rise by the number of steps to get the actual rise per step. For example, if your total rise is 108 inches (9 feet), dividing by 7.5 gives 14.4, which rounds to 14 steps. The actual rise per step would be 108 / 14 = 7.71 inches, which falls within the IRC code maximum of 7.75 inches.

Number of Steps = Round(Total Rise / 7.5)
Actual Rise per Step = Total Rise / Number of Steps

The total run is calculated by multiplying the run per step (tread depth) by one fewer than the number of steps, because the top step is typically the landing or upper floor itself. The stringer length is determined using the Pythagorean theorem, and the stair angle is calculated using the arctangent function.

Total Run = (Number of Steps - 1) × Run per Step
Stringer Length = √(Total Rise² + Total Run²)

Building Code Requirements

The International Residential Code (IRC) establishes minimum and maximum dimensions for residential stairs. These requirements exist to ensure that stairs are safe and comfortable for all users, including children, elderly residents, and people carrying items up and down the stairs. Local building codes may adopt the IRC with modifications, so always check with your local building department before starting construction.

IRC Stair Dimension Requirements

RequirementIRC Standard
Maximum Riser Height7.75 inches (196 mm)
Minimum Riser Height4 inches (102 mm)
Minimum Tread Depth10 inches (254 mm)
Minimum Stair Width36 inches (914 mm)
Maximum Riser Variation3/8 inch (9.5 mm)
Minimum Headroom6 ft 8 in (2,032 mm)
Handrail Height34-38 inches (864-965 mm)
Nosing Projection3/4 to 1-1/4 inches (19-32 mm)

One of the most critical code requirements is uniformity. The tallest riser and the shortest riser in a flight of stairs cannot differ by more than 3/8 inch. The same rule applies to tread depth. Non-uniform steps are a major tripping hazard because people develop a rhythm as they climb or descend stairs, and an unexpected change in step height breaks that rhythm. This is why the total rise must be measured carefully and divided equally among all steps.

Handrails are required on at least one side of stairs with four or more risers. The handrail must be between 34 and 38 inches high, measured vertically from the stair nosing. Handrails must be graspable, meaning they are either circular with a 1-1/4 to 2-inch diameter, or they have a non-circular cross section with a perimeter of 4 to 6-1/4 inches and a maximum cross section of 2-1/4 inches. Guards (balusters) are required where the open side of the stairway is more than 30 inches above the floor below, with a maximum spacing of 4 inches between balusters.

Understanding Rise and Run

Rise and run are the two fundamental measurements of every stair step. The rise is the vertical height of one step, measured from the top of one tread to the top of the next tread. The run is the horizontal depth of one tread, measured from the face of one riser to the face of the next riser. Together, these two dimensions determine how steep or shallow the staircase feels to walk on.

A taller rise with a shorter run creates a steeper staircase that takes up less floor space but is harder to climb. A shorter rise with a longer run creates a more gradual staircase that is easier to climb but requires more horizontal space. Building codes limit the range of acceptable rise and run dimensions to ensure that all stairs fall within a safe and comfortable zone. The ideal rise for most residential stairs is between 7 and 7.5 inches, with a run of 10 to 11 inches. These proportions have been used for centuries and feel natural to most people.

The nosing is the portion of the tread that overhangs the riser below. Nosing adds effective tread depth without increasing the total run of the staircase. IRC code allows a nosing projection of 3/4 to 1-1/4 inches. When measuring tread depth for code compliance, the nosing is not included. The 10-inch minimum tread depth is measured from the front edge of one nosing to the front edge of the next, which is the actual usable surface where your foot lands.

The Comfort Rule

Beyond the minimum code requirements, experienced builders use a time-tested comfort rule to design stairs that feel natural and easy to climb. The rule states that the sum of one riser height plus one tread depth should equal 17 to 18 inches. This relationship was first documented by the French architect Jacques-Francois Blondel in the 17th century and has been validated by modern ergonomic studies.

Comfort Rule: Rise + Run = 17" to 18"

A staircase with a 7.5-inch rise and a 10-inch run has a comfort sum of 17.5 inches, which is right in the sweet spot. A staircase with a 7-inch rise and an 11-inch run totals 18 inches, which is also comfortable. Stairs that fall outside this range can feel awkward. A comfort sum below 17 inches means the stairs are too steep with short treads, forcing you to place your feet carefully on each step. A sum above 18 inches means the stairs are too shallow, causing you to take unnaturally long strides with minimal height gain per step.

Another common formula used by builders is the 2R + T rule, where two times the riser height plus the tread depth should fall between 24 and 25 inches. For a 7.5-inch rise and 10-inch run, this gives 2(7.5) + 10 = 25 inches, which is right at the upper limit. Both formulas produce similar results and are widely accepted in the construction industry as guidelines for comfortable stair design.

Stringer Calculations

The stringer is the structural backbone of a staircase. It is the angled board that supports the treads and risers, running from the bottom floor to the top landing. Stringers are typically cut from 2x12 lumber for residential stairs, though engineered wood or steel stringers are used in some applications. Most staircases have three stringers: one on each side and one in the center for additional support on wider stairs.

The length of a stringer is calculated using the Pythagorean theorem. The total rise and total run form the two legs of a right triangle, and the stringer is the hypotenuse. For a staircase with a total rise of 108 inches and a total run of 130 inches, the stringer length is the square root of (108 squared plus 130 squared), which equals the square root of (11,664 + 16,900) = the square root of 28,564 = approximately 169.0 inches, or about 14 feet 1 inch.

Stringer Length = √(Total Rise² + Total Run²)

When purchasing lumber for stringers, always buy boards that are at least 12 inches longer than the calculated stringer length to allow for the top and bottom cuts. A 2x12 board should have a minimum of 5 inches of solid wood remaining at the narrowest point after the notches are cut. This is known as the throat of the stringer, and it provides the structural strength. If the throat is too thin, the stringer can crack under load. For the standard 7.5-inch rise and 10-inch tread depth, a 2x12 provides about 5.5 inches of throat, which is adequate for residential use.

To lay out a stringer, use a framing square with stair gauges clamped at the rise measurement on one leg and the run measurement on the other. Starting at one end of the board, align the gauges against the board edge and mark the first step. Slide the square along and mark successive steps until you have marked all risers and treads. The bottom of the stringer must be cut shorter by the thickness of one tread to compensate for the added height of the tread material on the first step. Similarly, the top of the stringer may need adjustment depending on how it connects to the upper landing.

Types of Stairs

Staircases come in many configurations, each suited to different spaces and architectural styles. The most common types include straight stairs, L-shaped stairs, U-shaped stairs, winding stairs, and spiral stairs.

Straight stairs are the simplest and most economical to build. They run in a single direction from bottom to top without any turns. Straight stairs are easy to calculate, easy to build, and easy to move furniture on. However, they require the most horizontal floor space, which can be a limitation in smaller homes. A straight staircase with 14 steps and a 10-inch run requires over 10 feet of horizontal space.

L-shaped stairs have a 90-degree turn at a landing platform, creating an L shape when viewed from above. The landing breaks up the staircase into two shorter flights, which can be safer because a fall only extends the length of one flight rather than the entire staircase. L-shaped stairs fit well into corners and can work in spaces where a straight staircase would not fit.

U-shaped stairs (also called switchback stairs) make a 180-degree turn at a landing, with the upper flight running parallel to and above the lower flight. This configuration fits into a compact rectangular footprint and is common in two-story homes where space is limited. U-shaped stairs require careful attention to headroom clearance where the upper flight passes over the lower flight.

Winding stairs use pie-shaped treads (called winders) at the turns instead of flat landings. Winders save space but are more difficult to build and can be less safe than landings because the tread depth varies from the narrow inside to the wide outside. Building codes require that winder treads measure at least 10 inches at a point 12 inches from the narrow end and at least 6 inches at the narrowest point.

Spiral stairs wind around a central pole in a continuous curve. They take up the least floor space of any staircase type but are the most difficult to navigate, especially with furniture or large items. Building codes have specific requirements for spiral stairs, including a minimum clear width of 26 inches and a minimum tread depth of 7-1/2 inches measured 12 inches from the narrow edge.

Common Stair Materials

The choice of materials for stairs depends on the location (interior vs. exterior), budget, aesthetic preferences, and local building code requirements. Each material has advantages and limitations that should be considered during the planning phase.

Dimensional lumber (pine, fir, spruce) is the most common material for stair framing. Stringers are typically cut from 2x12 boards, treads from 2x10 or 2x12 boards, and risers from 1x8 boards. Softwood lumber is affordable, widely available, and easy to work with. However, softwood treads wear quickly under heavy foot traffic and are best covered with carpet, hardwood treads, or another durable finish material.

Hardwood (oak, maple, hickory, walnut) is the premium choice for interior stair treads and handrails. Hardwood treads are beautiful, extremely durable, and can last the lifetime of the home. Oak is the most popular species for stairs due to its hardness, attractive grain, and relatively moderate cost compared to other hardwoods. Prefinished hardwood stair treads are available from most lumber suppliers and can be installed over a plywood or softwood substrate.

Pressure-treated lumber is required for exterior stairs that are exposed to moisture and ground contact. The preservatives in pressure-treated wood resist rot, decay, and insect damage. Common species include southern yellow pine and hem-fir. Pressure-treated stairs should be allowed to dry for several weeks before staining or sealing. Composite decking materials can also be used for exterior stair treads and provide low-maintenance durability.

Concrete is used for basement stairs, exterior entry stairs, and commercial applications. Concrete stairs are formed and poured as a single unit, creating a solid, fire-resistant structure. They are typically finished with carpet, tile, stone, or a concrete overlay. Concrete stairs are extremely durable but difficult to modify once poured.

Steel is used for structural stair stringers in commercial buildings, industrial settings, and modern residential designs. Steel stringers can span longer distances than wood and support heavier loads. They are often combined with wood or glass treads for a contemporary look. Steel stairs require welding or bolting for assembly and should be treated with primer and paint or powder coating to prevent rust.

Planning Your Staircase

Proper planning is the key to a successful staircase project. Before cutting a single board, take the time to verify measurements, check code requirements, and consider how the staircase will integrate with the surrounding structure and finish materials.

Measure the total rise precisely. Use a level and tape measure or a story pole to measure the exact vertical distance from finished floor to finished floor. If the finish flooring is not yet installed, add the thickness of the floor material to your measurement. A common mistake is measuring from subfloor to subfloor and forgetting to account for tile, hardwood, or carpet that will be added later. This oversight can throw off the riser height by 1/2 to 3/4 inch.

Check headroom clearance. Building codes require a minimum of 6 feet 8 inches of headroom measured vertically from the nosing of any tread to the ceiling, header, or any obstruction above. Headroom is often the limiting factor when adding stairs through an existing floor. If headroom is tight, you may need to lengthen the stair opening (the hole in the upper floor) or adjust the stair layout.

Determine the stair width. The minimum width for residential stairs is 36 inches measured between the finished walls or between the handrails if there are no walls. However, 42 inches is more comfortable and allows two people to pass. Main staircases in many homes are 42 to 48 inches wide. Basement stairs and secondary stairs can be narrower but still must meet the 36-inch minimum.

Plan for landings. A landing is required at the top and bottom of every staircase. The landing must be at least as wide as the staircase and at least 36 inches deep in the direction of travel. Doors that open over a staircase must have a landing on the stair side with enough depth to accommodate the door swing. This is a commonly overlooked requirement that can create costly problems during framing inspections.

Deck Stair Considerations

Deck stairs present unique challenges compared to interior stairs because they are exposed to weather, connect to an elevated structure, and often must accommodate varying ground conditions. The same basic calculations for rise, run, and stringer length apply, but additional factors must be considered during design and construction.

The total rise for deck stairs is measured from the ground level to the top of the deck surface. Because the ground may not be perfectly level at the base of the stairs, measure the total rise using a level extended out from the deck edge and a tape measure dropped vertically to the ground. If the ground slopes, measure at the point where the stairs will actually land and plan for a gravel or concrete pad at the base to provide a level, stable footing. For a complete walkthrough of the building process, see our guide on how to build deck stairs.

Deck stair stringers must be securely attached to the deck frame at the top and to a solid footing at the bottom. At the top, use a stair stringer connector or a ledger board bolted to the rim joist. The stringers should never be attached with nails alone. At the bottom, stringers should bear on a concrete pad or footing that extends at least 6 inches beyond the stringer in all directions. The pad prevents the stringers from sinking into the ground, shifting sideways, or being undermined by erosion.

All exterior stair lumber must be rated for ground contact or elevated outdoor use. Use pressure-treated lumber rated for the appropriate exposure level. For stringers and framing in ground contact, use lumber rated UC4A or UC4B. For treads and risers above ground, UC3B is typically sufficient. Alternatively, composite decking and PVC materials can be used for treads and are popular choices for low-maintenance deck stairs.

Deck stairs wider than 36 inches should have a center stringer for additional support. Stairs wider than 6 feet may need two center stringers spaced evenly. Handrails are required on at least one side of deck stairs with four or more risers, and guards are required on the open side of any stairway where the drop exceeds 30 inches. Guard balusters must be spaced no more than 4 inches apart to prevent children from squeezing through.

Safety Requirements

Stair safety involves more than just meeting dimensional code requirements. Proper lighting, slip-resistant surfaces, secure handrails, and clear pathways all contribute to a safe staircase. Falls on stairs are one of the most common causes of serious injuries in homes, and many of these falls are preventable with proper design and maintenance.

Lighting: Building codes require a light at the top and bottom of every stairway. The light switch must be accessible from both levels, typically using three-way switches. For exterior stairs, use weather-rated fixtures rated for wet or damp locations. Consider low-voltage LED step lights installed in the risers or along the stringer to illuminate each tread individually, especially for exterior stairs used at night.

Slip resistance: Stair treads should provide adequate traction in all conditions. For interior stairs, carpet runners, non-slip paint, or textured hardwood finishes improve traction. For exterior stairs, use textured composite treads, non-slip tape, or treads with molded grip patterns. Outdoor wood treads can become slippery when wet or icy, so consider anti-slip coatings or metal tread covers in climates with rain, snow, or freezing conditions.

Handrail continuity: Handrails should run the full length of the stairway without interruption. The handrail must extend horizontally at least 12 inches beyond the top riser and at least the depth of one tread beyond the bottom riser. These extensions give users something to grab before they start ascending or after they finish descending. The handrail must be securely mounted to the wall or to posts that are anchored to the stair structure, not just the finish material.

Clear width: Keep the stair path clear of obstructions at all times. Do not store items on stairs or landings. The minimum clear width of 36 inches must be maintained at all points, including past handrail brackets, lighting fixtures, and decorative elements. In an emergency, stairs are the primary exit route, and any obstruction can be dangerous.

Uniformity: As mentioned throughout this guide, uniform rise and run dimensions are perhaps the single most important safety feature of any staircase. The human body quickly adapts to a rhythm when climbing or descending stairs, and any unexpected variation in step height or depth disrupts that rhythm and causes stumbles. The IRC limits the variation between the tallest and shortest riser (and between the deepest and shallowest tread) to 3/8 inch within any single flight of stairs.

Frequently Asked Questions

How do I calculate the number of stairs I need?

Measure the total rise from the finished floor at the bottom to the finished floor at the top, in inches. Divide this number by 7.5 (the ideal riser height) and round to the nearest whole number. This gives you the number of steps. For example, a 9-foot (108-inch) total rise divided by 7.5 equals 14.4, which rounds to 14 steps. The actual riser height would be 108 / 14 = 7.71 inches per step. Always verify that the resulting riser height falls within code requirements of 4 to 7.75 inches.

What is the building code for stairs?

The IRC requires a maximum riser height of 7.75 inches and a minimum tread depth of 10 inches. The minimum riser height is 4 inches. Stairs must be at least 36 inches wide with a minimum headroom of 6 feet 8 inches. Handrails are required on at least one side for stairs with four or more risers, mounted between 34 and 38 inches high. All risers and treads must be uniform with no more than 3/8-inch variation within a flight.

What is the 17-18 rule for stairs?

The comfort rule states that the riser height plus the tread depth should equal 17 to 18 inches. This ratio creates a staircase that feels natural and easy to climb. A 7.5-inch riser with a 10-inch tread equals 17.5 inches, which is ideal. Stairs outside this range may feel too steep (sum below 17) or too shallow (sum above 18). Another similar rule is 2R + T = 24 to 25 inches, where R is rise and T is tread.

Related Calculators