Math and Percentages
Posted on 2013-01-25
I'm writing some PHP software to calculate prices. I'm having trouble wrapping my head around something. I'll put it in terms of cars to simplify what I'm looking for.
Average Cost of Car: $1000
Fee to Buy Car: 10%
Cost To Sell Car: 15%
Profit Needed: 25%
The software I'm building suggests prices to buy cars at based on the average sale price of the car. Here is how it works,
Car dealer buys car, pays extra 10% in a fee to buy
Car dealer pays 15% to 3rd party to market car
Car dealer wants to make at least 25% on the car.
I need to come up with some sort of equation of what to buy the car (before the buy fee) at knowing they are going to charge me an extra 10% to buy the car and then sell the car at the average market price minus the 15% fee it will cost me to sell the car. On top of it the price we pay for the car must leave 25% profit to be made. This gets tricky as the price we pay directly influences the buy fee. Of course what we buy the car for will be well below the average sell price of $1000 as we want to make money. Also keep in mind that we will assume we are going to be able to sell the car for $1000 not more or less.
Thanks for your help in advance.