Guardrail is needed when there is a fall of two foot or so. With that said, most all stairs will need guardrails. If guardrails are not needed then the stair would have walls on both sides of the stair. There are many UBC (Universal Building Code) rules when drawing stairs.