Codes vary from one place to another, and local authorities may have stricter requirements than the national codes. It is always wise to check with local authorities before undertaking any building project.
The general rule for exterior steps is that railings are required if there are four or more steps. There are also specific requirements for just what constitutes a handrail. For example, a 2-by-4 is not considered a handrail because it cannot be safely gripped.
Rules for interior steps are different. In most areas more than one step will require a handrail. As with exterior steps, the railings must be such that they can be easily gripped by small hands. Again, check with local authorities for location-specific regulations.
Err on the Side of Caution
Safety should always be the primary consideration. In regions with snow and ice, consider installing a handrail for any number of exterior steps as a safety precaution, especially if individuals with physical infirmities utilise the steps. To prevent falls, consider installing rails for all interior steps.