This page contains the equations used in the Compression Spring Fatigue calculator. 
The maximum and minimum shear stress t on the inside surface of the spring coils are proportional to the spring forces F_{max} and F_{min},
where D is the mean diameter of the spring (measured from the centers of the wire crosssections), W is the Wahl correction factor to account for the spring curvature stress, and C is the spring index (essentially an aspect ratio of the spring crosssection),
The shear stress in the spring alternates between its maximum and minimum values as the spring cycles. We therefore can define the average, or mean stress in the spring t_{mean}, and the alternating stress in the spring, t_{alt},

By definition, objects that are loaded under purely oscillatory loads (s_{mean} = 0) fail when their stresses reach the material's fatigue limit s_{fatigue}.
Conversely, objects that are loaded under purely static loads (s_{alt} = 0) fail when their stresses reach the material's yield limit s_{yield}. For objects that have a mixture of s_{mean} and s_{alt} stresses, the Soderberg Criterion provides a way to calculate a failure limit. The Soderberg Diagram plots mean stress on one axis, and alternating stress on the other, and draws a line between the s_{mean} = s_{yield} and s_{alt} = s_{fatigue} points, as shown here,
We then plot the stress state our object of question as a point on the Soderberg Diagram. If the stress state is below the line, then we are OK. If the stress state is above the line, then failure in the part is likely. If we don't want to plot, we can calculate the point on the Soderberg line that corresponds to our mean stress by the equation,
The part will fail if our alternating stress is larger than the Soderberg stress limit,

The Soderberg Criterion was originally applied to direct stress problems, but we can apply to shear stress problems like the spring as well, provided we know the limiting shear fatigue and yield stresses.
And it is always a good idea to include a safety factor when estimating failure stresses! This calculator shrinks the limiting stresses s_{fatigue}and s_{yield} by the entered safety factor before plotting the stress state in the spring. 