You can put this solution on YOUR website!
c = cost
p = price
d = discount rate (discount rate = discount percent divided by 100)
s = sale price
m = markup rate (markup rate = markup percent divided by 100)
your formula would be:
s = (1-d)*p where:
p = (1+m)*c
if you put these 2 formulas together, you get:
s = (1-d)*(1+m)*c
d = .40
m = .50
your formula becomes:
s = (.6)*(1.5)*c which becomes:
s = .9*c
.9 is equivalent to 90% of cost which represents a 10% loss.
let's see how that works in real life.
assume the cost is $100.00
you mark it up to make the price equal to $150.00
you give a 40% discount which brings the sale price down to $150.00 minus .40 * $150.00 which equals $150.00 minus 60 dollars which equals $90.00
your cost was $100.
your sale price was $90.00
you lost $10.00
that represents a loss of $10/$100 = 10%