Can anyone help me calculating the Compression spring life cycle?

Can anyone help me calculating the Compression spring life cycle? Can be with theoretical calculation or with help of Solidworks Simulation.

SolidworksSimulation