# Finding the percentage component?

This topic is 5196 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Ok, I'm having a bit of a problem with my billing component for my latest project. I need to account for tax and the chance that the tax might change. At the moment, the tax is 10%. So, if I have a cost of $100 and I add 10% percent to it, it becomes$110. Then if I want to reverse it and find the tax component of $110, I just divide it by 11, to give$10. Now what happens if the tax was to change to something other than 10%. Adding the tax on is not a problem as I just take $100 and add whatever percentage it is. So 7% would be$107 and 12% is $112. The problem I'm having is I don't know how to reverse it if the tax changes to anything other than 10%. So if I had a price of$112 and a tax rate of 12%, how would I extract the tax value from the price? P.S. This is not H/W! I haven't been to school in almost 10 years. This is a genuine problem.

##### Share on other sites
total = BasePrice + BasePrice * tax

total = BasePrice (1+tax)

total / (1+tax) = BasePrice

• 14
• 30
• 9
• 16
• 22