Margin From Cost & Selling Price
Use this gross profit margin calculator to find margin, markup, and total profit.
Target Selling Price Calculator
Enter your cost and desired margin percent to calculate the minimum selling price.
What Is a Margin Calculator?
A margin calculator is a simple business tool that helps you evaluate how much profit you keep from every sale. Whether you run an ecommerce store, freelance business, restaurant, agency, or wholesale operation, understanding margin is essential for pricing correctly and staying profitable.
With the calculator above, you can quickly determine:
- Gross profit per unit
- Gross profit margin percentage
- Markup percentage
- Total revenue, total cost, and total profit by quantity
- Required selling price to hit a target margin
Margin vs. Markup: Know the Difference
Many people mix up margin and markup. They are related, but not the same:
- Margin is based on selling price.
- Markup is based on cost.
Core formulas
- Profit = Selling Price − Cost
- Margin % = Profit / Selling Price × 100
- Markup % = Profit / Cost × 100
Example: If cost is $60 and selling price is $100, your profit is $40. Margin is 40%, while markup is 66.67%.
How to Use This Calculate Margin Calculator
1) Calculate margin from your current price
- Enter your cost per unit.
- Enter your selling price per unit.
- Add quantity if you want total profit across multiple units.
- Click Calculate Margin.
2) Calculate selling price from desired margin
- Enter your cost per unit.
- Enter your target margin percentage (for example, 30%).
- Click Calculate Target Price.
Why Margin Matters in Real Business Decisions
Revenue alone can hide weak pricing. Margin gives a clearer picture of business health. If sales are increasing but margin is shrinking, your business may be growing in activity but not in profitability.
Use margin analysis to make better decisions about:
- Discount campaigns and promotional pricing
- Supplier negotiations and cost control
- Product mix optimization (push higher-margin products)
- Channel strategy (website vs. marketplace vs. retail)
- Hiring, marketing budget, and expansion timing
Common Pricing Mistakes This Tool Helps Avoid
- Confusing markup with margin: can result in underpricing.
- Ignoring variable costs: packaging, shipping, returns, and transaction fees can erase profit.
- Discounting without checking margin impact: a small discount can cause a large drop in profitability.
- Setting one-size-fits-all margins: different product categories often need different targets.
Practical Margin Benchmarks
There is no universal “perfect” margin, but these benchmarks can guide planning:
- Low margin / high volume: common in grocery and commodity goods
- Medium margin: typical in retail products with modest differentiation
- High margin: common in software, digital products, premium services, and branded goods
Your ideal margin depends on customer acquisition cost, operating overhead, competitive positioning, and growth goals.
Frequently Asked Questions
What is a good profit margin?
A good margin depends on your industry and business model. Compare against your category average and your own operating expenses.
Can I have a negative margin?
Yes. If your selling price is below your cost, you have a loss and therefore a negative margin.
Why can’t target margin be 100%?
At 100% margin, cost would need to be zero for a finite selling price. In normal business conditions, target margin must be below 100%.
Should I calculate margin before or after tax?
For operational pricing decisions, businesses usually calculate margin pre-tax and then model taxes separately.
Final Thoughts
If you want better pricing decisions, better forecasting, and better profitability, calculate margin regularly. Save this page and use the calculator whenever your costs change, your suppliers update prices, or you test new products. Small improvements in margin can create large improvements in long-term business performance.