Free online tool

Margin calculator

Calculate profit margin, markup, profit and selling price from any two values.

Profit margin formula(Selling price − Cost) ÷ Selling price × 100

Calculate your profit margin

Enter any two values. We’ll calculate the remaining fields.

Results update automatically

$
$
$
%
%
Live result

Profit margin ?

0.00%

Add any two independent values to see your result.

Profit ?$0.00
Markup ?0.00%
$0.00 Selling price
$0.00 Cost0.00%
$0.00 Profit0.00%

Bulk product margin calculator

Calculate and compare margins for multiple products, then export your results.
Open bulk calculatorClose
Products calculated0
Total cost$0.00
Total profit$0.00
Overall margin0.00%
ProductCost ?Selling price ?Profit ?Margin ?Markup ?Actions
$
$
$
%
%

Start here

How to use the margin calculator

Enter any two values you already know—such as cost and selling price. The margin calculator immediately works out profit, profit margin and markup, and you can edit any field to calculate in reverse.

If you knowThe calculator finds
Cost + Selling priceProfit, margin and markup
Cost + MarginSelling price, profit and markup
Cost + MarkupSelling price, profit and margin
Selling price + MarginCost, profit and markup
Profit + MarginSelling price, cost and markup

Margin and markup alone describe a percentage relationship, but they do not establish monetary values. Add cost, selling price or profit to provide the missing scale.

The basic idea

What is profit margin?

In business, margin usually refers to profit margin—the percentage of the selling price left after costs are deducted. A 25% margin means that $25 of every $100 in sales remains as profit before any expenses that were not included in the cost.

A profit margin calculator applies this relationship instantly, but the answer is only meaningful when the cost input includes the expenses you intend to measure.

For every $100 in sales$75 cost
25% margin$25 profit

The calculation

Profit margin formula and example

When calculating margin, first find the profit on the sale. The margin formula then compares that profit with the selling price, not the original cost.

Profit margin (%) = (Selling price − Cost) ÷ Selling price × 100

ProfitSelling price − Cost

MarkupProfit ÷ Cost × 100

How to calculate profit margin

1

Find the profitSubtract cost from selling price.

2

Divide by selling priceUse the amount paid by the customer.

3

Convert to a percentageMultiply the result by 100.

Cost$120.00Selling price$160.00
Profit$40.00Profit margin25.00%Markup33.33%

($160 − $120) ÷ $160 × 100 = 25%

Margin is based on selling price. Markup is based on cost.

Two different percentages

Margin vs markup

Margin measures profit against the selling price, while markup measures profit against the cost. That difference means the same percentage produces a different selling price.

Margin

Profit as a percentage of selling price.

Profit ÷ Selling price × 100

Markup

Profit as a percentage of cost.

Profit ÷ Cost × 100

Quick margin and markup reference

MarkupEquivalent margin
10%9.09%
20%16.67%
25%20.00%
33.33%25.00%
50%33.33%
100%50.00%

A 25% margin is not the same as a 25% markup. If an item costs $120, a 25% margin gives a selling price of $160. A 25% markup gives a selling price of $150.

A common margin calculation mistake

Adding the target percentage directly to cost calculates markup. To calculate a target margin, divide the cost by one minus the margin expressed as a decimal.

Work backwards from a target

How to calculate selling price from margin

Selling price = Cost ÷ (1 − Margin / 100)

For a $120 cost and a desired 25% margin, divide $120 by 0.75. The required selling price is $160.

Do not simply add 25% to the cost. That produces a 25% markup, not a 25% margin.

Getting an accurate result

What costs should you include in a profit margin calculation?

The result can only reflect the costs you enter. Decide whether you want to measure the margin on one product or the profitability of the entire sale.

Direct product costs

  • Purchase or manufacturing cost
  • Packaging
  • Transaction fees
  • Shipping paid by the business
  • Marketplace commissions

Broader business costs

  • Marketing
  • Wages
  • Software
  • Rent and utilities
  • Taxes and other overhead

If Cost includes only the direct cost of the product, the result is closer to gross margin. A broader profit calculation requires every relevant business expense, so this result is not automatically your final net profit margin.

Interpret your result

What does your margin result mean?

The calculator measures profit relative to selling price using the costs you enter. A product-level gross margin is not the same as company-wide net margin after overhead, interest and tax.

For dated industry reference figures and a cost-based approach to setting a target, read our guide to what makes a good profit margin.

Use the right comparison

Gross margin vs net margin vs sales margin

Sales margin

The profit on a sale as a percentage of its selling price.

Gross margin

Revenue minus direct cost of goods sold, expressed as a percentage of revenue.

Net margin

What remains after all business expenses, interest and taxes are deducted.

This tool works primarily as a product and sales margin calculator. It can also be used as a profit calculator when you enter cost and selling price. It reflects net profitability only when every relevant expense is included in Cost.

Running a restaurant? Use the food cost percentage calculator for ingredients and inventory, and the labor cost percentage calculator for wages, employer taxes and benefits. Analyzing an entire company instead? Use the operating margin calculator for core profitability after operating expenses, or the EBITDA margin calculator to reconcile EBITDA from net income. Managing retail stock? The GMROI calculator relates gross profit to average inventory at cost.

About this tool

About Margin Calculator

Margin Calculator is a free, independent tool for calculating profit margin, markup, profit and selling price. Calculations run locally in your browser, and the formulas and accuracy checks are published so every result can be verified.

Learn more about this calculator

Formula review

Transparent and tested

Calculations run locally in your browser, keep full precision internally and are checked against negative derived values and six published calculation cases. Money and percentages are displayed to two decimal places. Last reviewed August 28, 2026.

See formulas and accuracy checks

Short answers

Frequently asked questions

What is a good profit margin?

A good profit margin depends on the industry, business model and costs included. Compare like with like: gross margin with gross-margin benchmarks and net margin with net-margin benchmarks. A sustainable margin should cover the remaining expenses and leave an acceptable profit.

What is the difference between margin and markup?

Margin is profit as a percentage of selling price. Markup is profit as a percentage of cost. For a product that costs $60 and sells for $100, the $40 profit is a 40% margin but a 66.67% markup.

How do I convert markup to margin?

Divide markup by 1 plus markup, using decimal values. A 50% markup becomes 0.50 ÷ 1.50 = 33.33% margin. To convert margin to markup, divide margin by 1 minus margin.

How do I calculate selling price from a desired margin?

Use Selling price = Cost ÷ (1 − Margin). Convert the margin to a decimal first. For a $120 cost and a target margin of 25%, $120 ÷ 0.75 gives a selling price of $160.

Is sales margin the same as profit margin?

Sales margin usually means the profit on a sale expressed as a percentage of selling price, so it is commonly used in the same way as profit margin. The result changes depending on whether you include only direct costs or all business expenses.

Is a margin calculator the same as a profit calculator?

They overlap, but they emphasize different results. A profit calculator finds the monetary profit by subtracting cost from revenue. A margin calculator also expresses that profit as a percentage of selling price and may calculate markup or a target selling price.

Does this calculator show gross margin or net margin?

It shows the margin based on the Cost value you enter. Using only direct product or service costs produces a gross-style margin. To estimate net margin, Cost must include all relevant operating expenses, interest and taxes.

Can profit margin be negative?

Yes. Profit margin is negative when the included costs are higher than the selling price. For example, a $120 cost and a $100 selling price produce a −$20 profit and a −20% margin.

Can profit margin be over 100%?

Not in a standard sale with non-negative costs. Margin can equal 100% when cost is zero, but exceeding 100% would require an unusual negative cost or accounting adjustment. Markup, unlike margin, can exceed 100%.

What is the difference between gross profit and gross margin?

Gross profit is the monetary amount left after subtracting direct costs from revenue. Gross margin expresses that same gross profit as a percentage of revenue, which makes it easier to compare performance across products, periods or businesses.

Which costs should I include in a margin calculation?

Include the costs relevant to the decision you are making. For a product margin, that may include purchase or manufacturing cost, packaging, transaction fees, marketplace commissions and shipping paid by the business. Taxes collected from customers should not be treated as revenue when they are passed directly to a tax authority.

Can I calculate margins for multiple products?

Yes. Open the Bulk product margin calculator below the main calculator, rename each product and enter any two values per row. You can compare the results and export the completed table as a CSV file or print it to PDF.

Are my calculation values stored?

No account is required, and calculation values are processed locally in your browser. Values are included in a URL only when you intentionally use Copy calculation link, so anyone with that link can see those supplied values.

Does changing currency convert the amounts?

No. The currency selector changes the displayed symbol and local number formatting only. It does not use exchange rates or convert the values you entered.