How it works
Start with the total rise: the vertical distance from the finished floor at the bottom to the finished floor at the top. Divide it by the maximum riser height allowed and round up to get the number of risers, then divide the rise by that number for the exact height of each step.
There is always one less tread than risers, because the top floor acts as the last step. The total run is the number of treads times the tread depth. The stringer, the diagonal board that carries the steps, is the hypotenuse of rise and run.
In the US, the International Residential Code allows a maximum riser of 7 3/4 inches and a minimum tread of 10 inches, and riser heights may not vary by more than 3/8 inch. A comfortable stair has 2 risers plus 1 tread adding up to about 24 to 25 inches.