Ok, so this is not the most advanced programming question – and it kind of borders on e-commerce, but it has specifically come up twice in my career – which is only 10 years old, so I figured I would ask it.
Question: I want to markup a price 10% from its original cost for a website, which is the proper way to do it:
NP = (P * 1.1)
or
NP = (P / 90) * 100
Where P is the original Price and NP is the New Price?
Background:
I am a web developer. I have worked on several e-commerce sites in my time. A few years back, I was building a freelance site for a tool shop. The guy had been in business for years and was moving into online sales. I wrote a script that took his core inventory list, cycled through it and automatically marked up the price 10% before inserting into the Database. I used formula #1. When he reviewed it he said the price was too low and to use formula #2.
Using formula #1, a 15 dollar product is now equal to 16.5, using two it is $16.66.
His logic was that 15 is 90% of $16.66 and thus 16.66 a 10% markup, by which 16.5 is only about a 9% markup.
Flash forward a few years to today and and I hit the same problem. My company has a massive list of inventory that gets marked up and down in a number of ways. Our old DBA was marking up the price for distributors 10%. He was using formula 1. Our new DBA rewrote a stored procedure and started using formula two.
A few people flipped out and started saying that the distributor prices were way too high and that the old formula was correct. We sell large quantities of relatively low-cost items, the fear is that our distributors would balk at the cost.
Logically it seemed that formula #1 was the proper way to markup, but the experienced business owner told me the other way was. Now I am hearing people say the opposite.
EDIT: My Using the original 15 example. It has always seemed to me that 15 is actually a 10% markdown of 16.66 where as 16.5 is the proper 10% markup of 15.
1
The proper way to increase something by 10% is to multiply by 1.1. Formula 2 is based of the misguided assumption that a 10% increase followed by a 10% decrease should yield the original number. That’s not how it works. You would need to multiply by the inverse fraction.
Ex: Given NP = 1.1 * P
Applying a 10% discount gives .9 * NP => .9 * 1.1 * P = .99 * P
To make it easier to see, use 50% instead of 10%. If I have a $10 product and I increase the price by 50% its new price becomes $15. If I then apply a 50% discount the price becomes $7.50.
To get back to the original price I need to apply a 33% discount.
NP = 1.5 * P
Apply 33% discount => NP * (1/1.5) => NP * .67 => 1.5 * P * .67 => P
They are confusing profit margin and markup. Profit margin is formula 2, and is based on the selling price of the item. Profit margin can never be higher than 100%. Markup is formula 1, and is based on the wholesale cost of the item. Markup has no upper limit.
2
Formula one adds a percentage of the cost price.
Formula two says that the cost price should be a percentage of the sales price.
The idea between them is totally different. It’s not about the calculation but how you work with pricing. So there is no wrong or right. It is just different.
The new DBA did it wrong because he changed the business rules without commitment as it seems. That’s the only error.
2
My math background tells me formula #1
My background dealing with business guys: whatever your boss or the sales person can get away with and still keep customers happy. Which could be #2 but anything really.
And it’s also about how you word the requirements:
For instance: 10% of the price, is our markup. Then it’s a clear #2.