You don't calculate laws, you might be able to calculate outcomes.
Diminishing returns is a concept due to classical economists such as Malthus, Menger and Senior.
These days it's usually taken to be the (presumed decreasing) rate of change of output from a production process as an input increases with other inputs staying the same.
Most easily done by taking the second partial derivative of a production function.
The rate of change of the rate of change of output (intentional doubling up here) (i.e. increasing or diminishing returns) be more or less be calculated if you make very specific assumptions about just what is happening and have an adequate set of data. You also need be careful (and this isn't easy) that you aren't actually calculating something else, even if the (excel) calculation itself is arithmetically accurate.
What's this for? A college project or something?