I am trying to calculate the break-even price on an individual product given a percent of the price I sold it for and the price I bought it for. For example: I buy an item for $200 and the fees on the sale of the item are 13% of the final sale price. I want the answer to be $230. $230 (sale price) * .13 (percent fee) = $29.90 (fee in dollars) (round up to $30)$230 (sale price) - $200 (item cost) - $30 (fee) = $0 (break even)So if I buy an item at $200 I need to sell it at $230 just to break even. This seems like an easy problem but I haven't been able to figure out a way that isn't brute force because the fee changes with every sold price so there doesn't seem like a way to know the fee in advance. I've been just guessing and plugging in the numbers but there has got to be another way so I can write up a simple script. I also don't care about cents, I'm going to round everything up.I am looking for a non-brute algorithm. The only thing I can come up with is brute forcing it and I'm sure there is a better algorithm that exists. Looking at various inputs and outputs I don't see a pattern. 
Looking to calculate break even price (minus fees) on an individual level without brute forcing
algorithms
After you take off the 13%, you have 87% remaining.  You multiply by 0.87 to get your revenue:$230 * 0.87 == $200.10From this point, it's basic algebra to show if you know the $200 you divide by 0.87 to get $230.  So, your formula is:original price / (1 - fees)$200 / (1 - 0.13) = $229.89