Building stairs is a job that experienced carpenters know requires accurate measurements and diligent work habits. I'll attempt to guide you through the steps, pun intended, of staircase construction in a 'dwelling unit'. 
Knowledge of how to build stairs is very important not only in their being useful and looking good, but also in preventing accidents. Besides needing to be sturdy and wide enough, stairs need to be consistent. Each step must be exactly the same size as every other step. (see Figure 1)
The first thing to do is to measure the height where your stairs will go.
This is your most important measurement. It is called the total rise. Every other measurement depends on it. The total rise is the vertical distance between the surface of the higher floor and the surface of the ground, sidewalk or the lower floor that the last step will be on (see Figure 2)
The total run is the horizontal distance between the edge of the upper floor and the end of the bottom step.
Each step has two basic measurements. The horizontal or flat part of the step is called the run. The vertical height difference between two steps is called the rise. The riser is the vertical part of the step between a tread and the underside of the tread above it. The part of the step that sticks out past the riser is called the nosing. The dimension of each step depends on a number of factors. Your stairs can be steep or gradual. The rise of each step can vary as well as its run. (see Figure 3)
To prevent the steps from being too steep or too gradual (see Figure 4), there is a relationship or proportion between the rise and the run. The British Columbia Building Code says that the rise must have a maximum of 200 mm (7 7/8") and a minimum of 125 mm (5"); the run has a maximum of 355 mm (14") and minimum of 210 mm (8 5/16"); the tread depth has a maximum of 355 mm (14") and minimum of 235 mm (9 1/4"). The tread depth is the run including the nosing. The nosing cannot be more than 25 mm (1"). You should check the building code of your own region before building or renovating anything structural for your home.
An old adage says that for older people
the ideal rise is 6" with a run of 12". An intermediate rise is 7" and the run is 11". The steepest should be no more than a rise of 7 7/8" and a run of 10" . Notice that, in each case, the run plus the rise equals 18". This is the simplest way of determining rise and run but the size of each step is totally up to you as long as they are within Building Code ranges. The ideal run and rise for a dwelling based on a 92 1/4" stud, 3-1 1/2" plates, 2x10 floor joists and 5/8" subfloor is 14 rises of 7 5/8" and 13 runs of 10 1/2" with a 1" nosing.
The preferred angle of stairs is around 30 – 35 degrees. There are three generally accepted rules for calculating the ideal rise to run ratio:
To keep each rise the same size, you'll need to make some calculations. Follow these steps:
Dan made a simple calculator for you to find the exact measurements of your rise and run. Click here to use the calculator
It's a good idea before you start building the staircase to make sure the planned staircase can fit within the space that you have. Calculate the total run of the staircase by multiplying the length of the run of each stair by one less than the number of rises you calculated in step #4. I like a run of 10" to 10 1/2" for a rise of 7 5/8". At a run of 10.5" for 13 treads, the arithmetic is: 10.5" x 13 = 136.5" for the total run. Then measure the physical space to make sure there is enough room. Hang a plumb bob from the edge of the upper floor, where the stairs are going to be attached. Measure from the plumb bob to where the bottom of the stairs will be. Make sure there's plenty of room so the stairs don't run into a wall or other obstruction.
Allow at least 36" between the end of the bottom step and a wall, if inside a house. If your measurement is too tight, try a run of less than 10.5" down to 10". Our total run in this case would be 10" x 13 = 130". We just saved 6.5". These calculations show the versatility in choosing different runs and rises. If a room is still limited try taking off a riser, thus eliminating a step. Remember, though that you must stay within the maximum and minimum parameters for rise and run. Maybe move the obstruction or move the stair opening back in the upper floor if you have reached your maximum rise and minimum run. Installing a landing will change directions of your stairs, which can give you more room in many cases. (For more info on landings see Installing a Landing in a Set of Stairs)
Watch the headroom also. (see Figure 5).
If the stairs are in an opening cut out of a floor area, headroom is a factor. The stair opening must be long enough to allow adequate headroom when coming down the stairs. The minimum headroom under a beam or joist is 1.95 m.(76 7/8"). Now that we have determined our rise and run and checked for adequate headroom, we can cut the stringers. (For more info on stringers see How to Layout Stair Stringers.)
Nail the stringers in place, securely to the top floor trim joist and to the bottom floor, or to the side walls. Next is installing the steps or treads. In our example we chose 1" plywood for the treads. Since our stairs are inside a house and will be carpeted, we will choose a nosing of 1" giving us a tread width of 11 1/2". Rip the 1" plywood 11 1/2" wide and the length to match the width between the walls less 3/4" on each side for the drywall to slip down. The width of the stair case is important as well. The minimum width is 860 mm.(33 7/8"). I prefer a width of 36" if appliances or furniture have to be moved up or down them. If your stairway is wider than 36" put in extra stringers to support the longer treads.
In an inside set of stairs the riser is usually closed, there is a board for the riser to attach the carpet or other finish to. This is different to an open riser set of stairs such as outside off a deck where the risers do not have a board attached to them. In this case the treads should be made from 2 x 4, 2 x 6, or larger to stand up to the weather. Also, on this type of stair overhang the step 4 1/2 inches from the outside edge of each stringer on a 3 foot or wider stair case. (Example of stairs off a deck.)
Back to our project. We have 13 treads ripped and cut to length now.
A tip to save your carpet is to round over the top edge of each nosing. Do this with a router, a belt sander or a block plane. It is easier to do this before installing the treads.
Let's rip the material for the risers. This can be 1/2" to 3/4" plywood. In new construction, there is usually scraps of 5/8" left from the sub-floor. Since our stairs will be covered with carpet, let's use these. Rip the riser pieces 7 5/8" and the same length as our treads. Now start assembly at the bottom. We discover that our first riser is too high, that's because we cut 1" off the bottom of the stringer. Adjust the first riser to fit the stringer, it should be 6 5/8", unless the depth of the floor covering on the bottom floor is different from the depth of the covering on each tread and the higher floor. What you want is to have the exact same height of each step all along from the lower floor to the upper floor. In other words, if the depth of the lower floor's carpetting or tile is thicker or thinner than the material on the treads then subtract or add the difference to this lowest (first) rise.
Nail the riser on with some construction adhesive or use the adhesive and screws. Nail the next riser on, then put some adhesive on each stringer at the bottom step and put some adhesive on the back edge of the tread where it meets the riser. Nail the bottom tread down to the stringer placing it tight against the second riser and from the back of the riser nail through into the tread. You can see that the tread is now supported by the stringer on each end and the lower riser supports the front while the upper riser supports the back - no squeaks here. Continue up the stairs following this procedure. When you arrive at the top riser, it will need to be trimed to fit. If there is no nosing on your top floor to match your stairs, now is the time to put one in. I usually rip a nosing from solid lumber, say a 2 x 4, to match the overhang and thickness of our stair nosings. Glue and drill and screw this nosing on securely.
If your stairs were built outside and the stringers have no support under the middle of them now would be the time to put 1 or 2 posts under the stringers for added strength. Also if these stairs are hanging off a deck with a 2 x 6 trim joist, not much is there to secure the stringers to at the top. What I like to do is support the stringers with a 4 x 4 that goes from a concrete block or footing right up to above the deck level to form the handrail post. Below the stringers and tight up to them, nail a 2 x 4 or 2 x 6 ledger across the posts. Then nail a 2 x 4 across the posts near the bottom to prevent the posts from kicking out.

Stairs need handrails. These should be between 800 mm(31 1/2") and 965 mm(38") , measured vertically from the edge of the stair nosing (see Figure 6) to the top of the handrail. I suggest 32" as a comfortable height.
At a landing, the handrail should be 36" high and at a balcony edge should be 42" high. These measurements are for single dwelling residential construction (one family house).