Business & Finance
Verified Tool

Margin Calculator

Calculate profit margins and markup

Start Using Margin Calculator Now
Free Forever No Signup
Last Updated: March 2, 2026
avatarBy Viblaa Team

Margin calculation

Markup calculation

Price from margin

Formula reference

Your supplier raises prices 15%. You need to update your pricing. But by how much? If you just add 15% to your selling price, you'll actually shrink your margin. And if you try to maintain the same dollar profit, you might price yourself out of the market.

Margin and markup confuse even experienced business owners. They sound similar, calculate differently, and getting them wrong means either leaving money on the table or losing customers to overpricing.

This calculator eliminates the guesswork. Know your exact margin, markup, and profit—before you set a single price.

What is a Margin Calculator?

A Margin Calculator computes profit margins, markup percentages, and selling prices based on your cost and pricing inputs. It helps you answer critical business questions:

  • Given cost and selling price, what's my margin?
  • Given cost and target margin, what should I charge?
  • What markup do I need to hit my profit goals?

Key formulas:

Margin = (Selling Price - Cost) / Selling Price × 100
Markup = (Selling Price - Cost) / Cost × 100
Profit = Selling Price - Cost
The Critical Difference

Margin uses selling price as the base (what you receive). Markup uses cost as the base (what you pay). A 100% markup means you doubled the cost. A 100% margin is mathematically impossible (you'd be charging with zero cost).

Why People Actually Need This Tool

Pricing Determines Survival

A 1% improvement in price has 4x more profit impact than a 1% improvement in volume or costs. Yet most small businesses guess at pricing instead of calculating strategically.

  1. Setting product prices — Start with cost, apply target margin, get optimal selling price.

  2. Evaluating deals — When a customer demands 20% discount, see the real margin impact before agreeing.

  3. Comparing products — Know which products in your catalog generate the most profit, not just revenue.

  4. Wholesale vs retail pricing — Calculate different margins for different sales channels.

  5. Menu engineering — Restaurants analyzing which dishes are high-margin stars vs low-margin dogs.

  6. Negotiating with suppliers — Understand how supplier price changes affect your bottom line.

  7. Break-even analysis — Know how much you can discount before selling at a loss.

How to Use the Margin Calculator

  1. Enter your cost — What you pay for the product (or cost to produce it).

  2. Enter selling price or target margin — Either your current price or your goal margin percentage.

  3. Review all metrics — See margin %, markup %, profit amount, and formulas used.

  4. Experiment with scenarios — Adjust inputs to see how price changes affect profitability.

MetricFormulaExample
ProfitPrice - Cost$100 - $70 = $30
MarginProfit ÷ Price × 100$30 ÷ $100 = 30%
MarkupProfit ÷ Cost × 100$30 ÷ $70 = 42.9%
Price from MarginCost ÷ (1 - Margin)$70 ÷ 0.70 = $100
Margin ≠ Markup

Setting a "50% margin" when you mean "50% markup" underprices by ~17%. Know which metric you're using before pricing decisions.

Real-World Use Cases

1. The Retail Pricing Decision

Context: An online store buys a product for $45 and wants 40% gross margin.

Problem: What's the correct selling price?

Solution: Price = $45 ÷ (1 - 0.40) = $45 ÷ 0.60 = $75 selling price.
Verification: ($75 - $45) ÷ $75 = 40% margin ✓

Outcome: Store prices correctly and maintains target profitability.

2. The Discount Impact Analysis

Context: A customer requests 15% off a $200 item. Standard margin is 35%.

Problem: What happens to margin after the discount?

Solution:

  • Original: $200 price, 35% margin = $70 profit, $130 cost.
  • After 15% discount: $170 price, ($170 - $130) ÷ $170 = 23.5% margin.
  • Margin dropped from 35% → 23.5% (33% decline in profitability).

Outcome: Sales team understands the trade-off before negotiating.

3. The Menu Price Audit

Context: A restaurant calculates food costs at $4.50 for a dish priced at $16.

Problem: Is this dish profitable enough compared to industry standards?

Solution: ($16 - $4.50) ÷ $16 = 72% margin.
Restaurant industry target: 65-70% food margin.
This dish is performing above target.

Outcome: Manager knows this is a "star" dish to promote. Reviews others for comparison.

4. The Supplier Price Increase

Context: Supplier raises widget cost from $12 to $14 (16.7% increase). Current selling price is $20.

Problem: How to maintain the original margin?

Solution:

  • Original margin: ($20 - $12) ÷ $20 = 40%.
  • New price for 40% margin: $14 ÷ 0.60 = $23.33.
  • That's a 16.7% price increase to pass through.

Outcome: Business knows exactly how much to raise prices, can decide if market will accept.

5. The Wholesale Strategy

Context: A manufacturer sells direct at $100 (60% margin) and wants to add wholesale at 50% margin.

Problem: What can they offer to retailers?

Solution:

  • Cost = $100 × (1 - 0.60) = $40.
  • Wholesale price at 50% margin = $40 ÷ 0.50 = $80.
  • Retailer can still achieve their typical 30-40% margin if they sell at $100-115.

Outcome: Clear wholesale pricing that works for both parties.

6. The E-commerce Fee Analysis

Context: Product costs $25, sells for $50 on Amazon. Amazon takes 15% referral fee.

Problem: What's the actual margin after platform fees?

Solution:

  • Amazon fee: $50 × 0.15 = $7.50.
  • Net revenue: $50 - $7.50 = $42.50.
  • Effective margin: ($42.50 - $25) ÷ $50 = 35% (not 50%).

Outcome: Seller understands true profitability and adjusts pricing or platform strategy.

7. The Consulting Rate Calculation

Context: A consultant wants $80/hour profit. Overhead (taxes, insurance, tools) adds $35/hour.

Problem: What hourly rate delivers the target income?

Solution:

  • Total cost: $35 + $80 = $115/hour needed.
  • If targeting 30% margin: $115 ÷ 0.70 = $164/hour rate.
  • Actual margin check: ($164 - $115) ÷ $164 = 30% ✓

Outcome: Consultant sets rate knowing it covers costs and profit.

Common Mistakes and How to Avoid Them

Confusion Costs Real Money

Swapping margin and markup on a $1M revenue business means $100K+ in mispriced products. The math matters.

Confusing Margin with Markup
❌ The Mistake
Thinking "I want 50% profit" and adding 50% to cost. A $100 cost becomes $150 (50% markup), but that's only 33% margin.
✅ The Fix
Clarify which metric you mean. For 50% margin on $100 cost: Price = $100 ÷ 0.50 = $200.
Applying Markup Instead of Margin
❌ The Mistake
Setting price = Cost × (1 + Margin%) when you meant to use margin, not markup.
✅ The Fix
Margin formula: Price = Cost ÷ (1 - Margin%). Markup formula: Price = Cost × (1 + Markup%).
Ignoring All Costs
❌ The Mistake
Calculating margin on product cost alone, forgetting shipping, handling, returns, and overhead.
✅ The Fix
Include all costs: landed cost, fulfillment, returns reserve, payment processing, and allocate fixed overhead.
Not Checking After Discounts
❌ The Mistake
Offering 40% off a product with 45% margin, thinking you're still profitable.
✅ The Fix
40% off leaves you with 5% margin before any overhead. Often that's a loss. Always calculate post-discount margin.
Setting Same Margin for All Products
❌ The Mistake
Applying 35% margin to everything regardless of competition, volume, or positioning.
✅ The Fix
High-volume commodities can take lower margins. Unique products can command higher. Analyze each category.

Privacy and Data Handling

This Margin Calculator runs entirely in your browser. Your pricing strategy stays confidential.

  • No costs, prices, or margins are transmitted anywhere.
  • No history stored.
  • No account required.
  • Works completely offline.

Your competitive pricing data never leaves your device.

Conclusion

Pricing isn't art—it's math. Every price you set determines how much you keep and whether you survive. Yet the difference between margin and markup trips up businesses daily, leading to chronic underpricing or lost sales from overpricing.

This calculator removes the confusion. Input your numbers, see your metrics, experiment with scenarios. Whether you're setting a single product price or auditing an entire catalog, know exactly where you stand before committing.

Your margin is your business. Protect it with precision.

Frequently Asked Questions