Repeating calculation with different values