HOKAY...now that we got that straight!
Code:
Item cost : 15.00
Seller fee : 3.46 (15% of 23.08)
Profit margin : 4.62 (20% of 23.08)
=====
Selling price : 23.08 That kinda agrees with your example; more precise : 4.62 / 23.08 = .20017
Seems straightforward enough:
c = item cost (given)
f = seller fee % (given)
m = profit margin % (given)
p = selling price (calculated)
General case formula:
p = c / (1 - f - m)
With above example: p = 15 / (1 - .15 - .20) = 15 / .65 = 23.08
So, for each sale, this would happen:
get c,f,m
p = c / (1 - f - m)
PRINT c : 15.00
PRINT p*f : 3.46
PRINT p*m :4.62
PRINT p : 23.08
And, of course, c,f and m can be ANY reasonable amounts.