How markup is calculated
Markup is profit expressed as a percentage of cost: markup% = (selling price - cost) / cost × 100. Rearranged, that gives the other two directions this calculator solves: selling price = cost × (1 + markup% / 100), and cost = selling price / (1 + markup% / 100).
A $40 item marked up 35% sells for $40 × 1.35 = $54.00, for a $14.00 profit. That $14.00 is 35% of the $40.00 cost, which is exactly the markup percent that went in. The formula is circular by design, since markup is defined relative to cost.
Markup vs. margin: the number that trips people up
Markup and margin both describe the same profit dollar, but they divide it by a different base. Markup divides by cost; margin (sometimes "gross margin" or "gross profit margin") divides by the selling price instead: margin% = (selling price - cost) / selling price × 100. Because the selling price is always larger than the cost on a profitable sale, margin% is always the smaller of the two numbers for the same transaction (Corporate Finance Institute; AccountingTools).
Cost $70, sell at $100: profit is $30. As markup, that $30 is 42.86% of the $70 cost. As margin, the same $30 is 30% of the $100 price. Using one number where the other is meant (for example, trying to hit a 30% profit margin by adding a flat 30% markup to cost) undershoots the actual margin target, because 30% markup on $70 only lands at 23.08% margin, not 30%.
Worked example: pricing from a target markup
A retailer buys a product for $18.50 and wants to price it at $24.99, a common practice of landing on a round consumer price rather than an exact multiple of cost. The markup on that sale is (24.99 - 18.50) / 18.50 × 100 = 35.08%, and the margin is (24.99 - 18.50) / 24.99 × 100 = 25.97%. The two percentages describe the identical $6.49 of profit; neither is "wrong," they just answer different questions. Markup answers "how much did I add to cost," and margin answers "what share of the sale price is profit."
Why the gap between the two widens at higher markups
At low markups the gap between markup% and margin% is small (10% markup is 9.09% margin, a 0.91-point gap), but it widens fast as markup climbs: 100% markup ("keystone" pricing, common in apparel and jewelry retail, meaning cost is simply doubled to set the price) is only 50% margin, and 200% markup is 66.67% margin, not 200%. Margin can never reach 100% no matter how high the markup goes, since margin is profit as a share of a selling price that always includes the cost as well as the profit.