Define function for calculating progression.