It’s rare that I write a post unrelated to programming. There’s a first time for everything however and today I thought I’d share a quick little mathematical tip.
I recently faced a scenario where I had two figures; a net total and a gross total. What I didn’t have was the percentage applied to the net to get the gross value. Allow me to reveal how to acehive this:
Percentage = (Gross - Net) / Net * 100
Percentage = (120 - 100) / 100 * 100 = 20%