In general terms, the length of a stringer for a stairs is 14 inches for every step. For a more precise calculation, you need the know the height of the riser and the width of the tread for the steps.
Once you have found these measurements, multiply the riser measurement by itself and the tread measurement by itself, and add these two numbers. Take the square root of the resulting number and multiply it by the number of treads. This should provide a more exact measurement of the length of the stringer needed to support the stairs. Check building codes in your area to make sure of the maximum riser height and the minimum tread width.