Financial

Margin Calculator

Results

Enter values and calculate to see results.

Embed on your site

Any ezcalcs calculator can be embedded with one script tag. Copy the snippet below or use the homepage playground to preview and customize.

<!-- ezcalcs embed: margin-calculator — paste anywhere in the body -->
<script
  async
  src="https://ezcalcs.net/embed.js"
  data-calc="margin-calculator"
  data-theme="light"
  data-width="100%"
  data-height="640"
></script>

Every dollar of revenue is not a dollar of profit. Your margin calculator shows exactly how much you keep after costs. Enter your cost price and selling price (or your desired margin percentage) and get instant results for profit margin, markup, and dollar profit.

Use this tool for pricing decisions, evaluating product profitability, or comparing margins across your product lines. The calculator handles the math so you can focus on strategy.

Profit Margin Calculator

A profit margin calculator takes your revenue and costs, then returns your profit as a percentage of the selling price. It answers a straightforward question: how much of each sale do you actually keep?

This tool is useful for:

  • Setting prices on a new product or service
  • Checking whether a discount still leaves you profitable
  • Comparing profitability across different products and services
  • Evaluating whether cost increases have eroded your margins

Enter your numbers above to calculate profit margin, markup percentage, and gross profit in seconds. Results are estimates for planning purposes, not professional financial advice.

How to Calculate Profit Margin

Profit margin measures profit as a percentage of revenue. It tells you the efficiency of each sale. A higher margin means more of every dollar earned stays with your business.

Calculate profit from selling price and cost price

Start with two numbers: your selling price and your cost price.

  1. Subtract cost price from selling price to get gross profit. (Selling Price − Cost Price = Gross Profit)
  2. Divide gross profit by selling price.
  3. Multiply by 100 to express it as a percentage.

Example: You sell a product for $80 and it costs you $50.

  • Gross Profit = $80 − $50 = $30
  • Profit Margin = ($30 ÷ $80) × 100 = 37.5%

You keep 37.5 cents of every dollar from that sale.

Calculate margin using the margin formula

The margin formula is:

Margin (%) = ((Selling Price − Cost Price) / Selling Price) × 100

This formula works for any product or service. Plug in your numbers and the margin percentage tells you how efficiently you convert revenue into profit.

A few quick reference points:

  • A 10% margin on a $100 item means $10 profit.
  • A 20% profit margin on a $100 item means $20 profit.
  • A 30% margin on a $100 item means $30 profit.

If you know your desired profit margin and cost price but need the selling price, rearrange the formula:

Selling Price = Cost Price / (1 − Desired Margin %)

For example, if your cost is $50 and you want a 40% margin: $50 / (1 − 0.40) = $83.33 selling price.

Gross Profit Margin and Gross Margin Calculation

Gross profit margin focuses on direct production costs only. It strips out everything except the cost of goods sold (COGS), which includes materials, direct labor, and manufacturing expenses.

Gross Profit Margin (%) = ((Revenue − Cost of Goods Sold) / Revenue) × 100

This metric tells you how profitably you produce or source your products before overhead enters the picture. It is the most common margin calculation for evaluating a specific product or product line.

What counts as COGS:

  • Raw materials and components
  • Direct labor tied to production
  • Packaging and shipping to your warehouse
  • Manufacturing overhead directly tied to the product

What does not count: rent, marketing, administrative salaries, and other operating expenses. Those belong in the net margin calculation.

A healthy gross profit margin varies by industry. Retail businesses often see 25% to 50%. Software companies can exceed 70%. The important thing is tracking your gross margin over time and comparing it against your own benchmarks.

Net Profit Margin and Net Profit Calculation

Net profit margin accounts for all business expenses, not just COGS. It reflects what you truly keep after operating costs, taxes, interest, and every other expense.

Net Profit Margin (%) = (Net Profit / Revenue) × 100

Where Net Profit = Revenue − COGS − Operating Expenses − Taxes − Interest

This is the bottom line metric. A business can have a strong gross margin but a weak net profit margin if operating costs, rent, or payroll consume too much revenue.

Key differences at a glance:

MetricIncludesBest for
Gross profit marginOnly COGSEvaluating product-level profitability
Net profit marginAll expensesEvaluating overall business profitability and financial health

Both matter. Gross margin helps with pricing decisions for individual products. Net margin tells you whether the whole business is profitable. Review both regularly, especially when costs increase or pricing changes.

Margin and Markup

Margin and markup describe the same profit from two different angles. They are not the same number, and confusing them is one of the most common pricing mistakes.

  • Margin is profit as a percentage of selling price (revenue).
  • Markup is profit as a percentage of cost price.

Same dollar profit. Different denominators. Different percentages.

Calculate margin vs. markup in pricing

Example: A product costs $60 and sells for $100. The profit is $40.

  • Margin = $40 / $100 = 40%
  • Markup = $40 / $60 = 66.7%

Here is a quick conversion reference:

MarginEquivalent Markup
20%25%
25%33.3%
30%42.9%
33.3%50%
50%100%

When to use each:

  • Use margin when analyzing profitability, reporting financial performance, or comparing across products.
  • Use markup when setting prices from a known cost. It directly answers "how much do I add to my cost?"

To convert markup to margin: Margin = Markup / (1 + Markup)

To convert margin to markup: Markup = Margin / (1 − Margin)

Getting these mixed up can cost you real money. A 50% markup produces only a 33.3% margin. If you target a 50% margin but accidentally apply a 50% markup, you underprice by a significant amount.

Margin Calculations and Margin Requirement

Margin calculations go beyond a single product. They help you evaluate performance across your entire business and make smarter pricing strategies.

Why margin calculations matter:

  • They reveal which products and services earn the most profit per dollar of revenue.
  • They help you spot profitability trends before cash flow problems develop.
  • They guide decisions about where to reduce your costs or invest in growth.
  • They show whether increasing sales volume or raising prices will improve future profits.

Ways to improve your margins:

  1. Negotiate lower costs with suppliers to reduce COGS.
  2. Raise prices where the market supports it.
  3. Cut operating expenses that do not drive revenue.
  4. Focus marketing spend on higher margin products.
  5. Reduce waste and production costs.

Businesses with higher margins have more room to reinvest, weather downturns, and fund growth. Review your margin percentage at least quarterly. If your costs increase or your pricing changes, recalculate immediately to understand the impact on profitability.

Note: The term "margin requirement" also appears in margin trading (forex, stocks). That concept refers to the collateral a broker requires to open a leveraged position. It is unrelated to profit margin in business pricing. This calculator focuses on business profitability, not trading margin.

FAQs

How do I calculate profit margin?

Subtract your cost from your selling price to get profit. Divide that profit by the selling price. Multiply by 100 for a percentage.

Formula: Margin (%) = ((Selling Price − Cost) / Selling Price) × 100

For example, selling at $200 with a $120 cost gives you a 40% profit margin.

What is the difference between gross margin and net profit margin?

Gross margin subtracts only the cost of goods sold from revenue. Net profit margin subtracts all expenses, including operating costs, taxes, and interest.

Gross margin evaluates product-level profitability. Net profit margin evaluates overall business profitability and financial health. A business needs both metrics to get the full picture.

How do I calculate margin from selling price?

Use the same core formula. Take your selling price, subtract your cost, then divide by the selling price.

If your selling price is $150 and your cost is $90: ($150 − $90) / $150 = 0.40, or 40% margin. The margin always uses selling price (revenue) as the denominator.

What is the margin formula for pricing?

When you know your cost and desired profit margin, rearrange the formula to find selling price:

Selling Price = Cost Price / (1 − Desired Margin)

If your cost is $75 and you want a 25% margin: $75 / (1 − 0.25) = $100 selling price. This ensures your margin target is met precisely.

How do I calculate profit and markup from cost price?

Start with cost price and selling price. Subtract cost from selling price to find profit.

For markup: divide profit by cost price and multiply by 100.

Example: Cost is $40, selling price is $70. Profit = $30. Markup = ($30 / $40) × 100 = 75%. Remember, this 75% markup translates to a 42.9% margin. They describe the same $30 profit from different perspectives.