Profit Margin & Markup Calculator
Enter a cost and price to instantly get your gross margin %, markup % and profit per unit — or set a target margin to find the price you should charge. Know the difference between margin and markup for good.
Open the free Margin & Markup Calculator →How it works
This tool answers the two questions every freelancer and small seller actually asks: "how much am I really making on this?" and "what should I charge to hit the margin I want?" It works both ways. Enter your cost and your selling price and it returns profit, gross margin %, and markup %. Or flip it around: enter your cost and a target margin, and the selling price calculator tells you the price to set.
The math is simple but easy to mix up. Profit = price − cost. Gross margin % = profit ÷ price × 100 (profit as a share of what the customer pays). Markup % = profit ÷ cost × 100 (profit on top of what it cost you). The base is the whole difference between margin vs markup: margin divides by price, markup divides by cost. For the same product, markup is always the bigger-looking number.
To run it backwards from a target margin, the formula is price = cost ÷ (1 − margin), with margin as a decimal. That is the reliable way to hit a profit target instead of guessing a markup and hoping the margin lands where you need it.
Worked example
Say a print job costs you $60 in materials and you sell it for $100.
- Profit = $100 − $60 = $40 per unit
- Gross margin = $40 ÷ $100 = 40% (you keep 40 cents of every dollar billed)
- Markup = $40 ÷ $60 = 66.7% (you added two-thirds on top of cost)
Notice the same $40 profit reads as a 40% margin but a 66.7% markup — same money, different base. Now run it backwards: if that same $60 cost needs a 50% margin instead, the price = $60 ÷ (1 − 0.50) = $60 ÷ 0.50 = $120. Charging $120 leaves $60 profit, which is exactly half of the $120 sale.
Frequently asked questions
- What is the difference between margin and markup?
- Markup is profit measured against your cost, while margin is profit measured against your selling price. For the same product they are always different numbers: markup uses cost as the base (profit ÷ cost), and margin uses price as the base (profit ÷ price). Because price is larger than cost, the margin percentage is always lower than the markup percentage.
- How do I calculate profit margin from cost and price?
- Subtract the cost from the selling price to get profit, then divide profit by the selling price and multiply by 100. For example, a $100 price with a $60 cost gives $40 profit, and $40 ÷ $100 = 40% gross margin.
- How do I find the selling price from a target margin?
- Divide your cost by (1 minus the target margin expressed as a decimal). To hit a 40% margin on a $60 cost, calculate $60 ÷ (1 − 0.40) = $60 ÷ 0.60 = $100. This is the selling price calculator method: enter cost and the margin you want, and it returns the price.
- How do I convert markup to margin?
- Divide the markup by (1 plus the markup). A 50% markup converts to 0.50 ÷ 1.50 = 0.333, or about 33.3% margin. To go the other way, margin to markup, divide margin by (1 minus margin): a 40% margin is 0.40 ÷ 0.60 = 0.667, or roughly 67% markup.
- Is a higher markup always better than a higher margin?
- They describe the same profit from different angles, so neither is inherently better. Markup is handy for setting prices from cost, while margin tells you what share of each sale you actually keep. Most businesses set prices using markup but report and compare profitability using margin.
- Does gross margin include all my costs?
- No. Gross margin only accounts for the direct cost of the product or service. It does not include overhead such as rent, software, taxes or your own time, so your net profit will be lower. Treat gross margin as a starting point and verify the full picture for your situation.