Could you write a python function that does that calculation?