Calculation of total refractive astigmatism by analyzing refractive parameters of the individual components can be very tedious, especially when the principal meridians among all the components are not orthogonal. A straightforward programming algorithm for accomplishing these calculations is presented. The algorithm is applicable to any programmable device which performs trigonometric functions.