Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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)


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.

share|improve this question

closed as off-topic by durron597, ratchet freak, Snowman, enderland, MichaelT Jul 18 '15 at 1:31

  • This question does not appear to be about software development within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

I'm voting to close this question as off-topic because it is not about a conceptual programming problem within the scope defined in the help center. – durron597 Jul 17 '15 at 21:09
up vote 7 down vote accepted

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
share|improve this answer

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.

share|improve this answer
A good question to ask to distinguish between them is "What happens if I have 100% here?" In 100% markup (Equation 1), you double the price. In 100% profit margin (Equation 2), you're dividing by 0 (because you're minting free money). – Bobson May 30 '13 at 17:39
@Bobson you nailed it. 100% markup makes perfect sense and thus equation 1 works with 100%. 100% profit margin only works if the product is infinitely expensive, hence equation 2 hits a divide by zero error. – Carson63000 May 31 '13 at 6:33

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.

share|improve this answer
you know I almost noted your point about the b rules in my question. Had the markup been done the #2 way all along then there would have been no issue... regardless of what the proper markup is. – picus May 30 '13 at 14:58
yes it's just semantics, how you read it. Your exact question has answer #1 but it is more about communication between business and tech guys. – Luc Franken May 30 '13 at 15:55

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.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.