Here is an easy way to calculate this complicated looking formula, I hope you enjoy this pdf attachment. Greetings.