Profit Margin Calculator

See how much of your revenue remains after the costs you include, or turn a markup into a margin.

  • Free
  • Nothing saved
  • Updated October 25, 2026
  • Sources read October 7, 2026
CalculatorRuns in your browser. Nothing is saved.

Positive revenue for one item or a consistent period.

Costs for the same item or period; zero is allowed.

Use up to two decimal places without commas or currency symbols. USD inputs are limited to $1 billion.

Result

Enter your numbers. Your result appears here as you type, or when you press Calculate.

Margin35%
Profit$28.00

In short

This profit margin calculator shows how much of your revenue is left as profit after the costs you include. It gives the profit in dollars, the profit margin (profit as a share of revenue) and the markup (profit as a share of cost).

Use it for one product, one order or one month: enter revenue and cost for the same thing and the result updates as you type. If you only have a percentage, switch to Convert a percentage. It turns a markup into a margin, or a margin into the markup you need, with no dollar amounts.

  • Example margin
    35%
    on $80.00 of revenue
  • Example markup
    53.85%
    the same $28.00 of profit
  • Profit
    $28.00
    $80.00 − $52.00
  • Convert
    23.08%
    margin from a 30% markup

Inputs

How to use it

Revenue (USD)
$80
What the customer pays for the item or period, after any discount you gave. It must be above $0.
Included cost (USD)
$52
Only the costs you choose to count, such as product cost, packaging, shipping you pay and platform fees. Zero is allowed. A cost you leave out is not subtracted.
Mode
Price and costConvert a percentage
Price and cost works from dollar amounts. Convert a percentage needs only a markup or a margin.
Direction
Markup to marginMargin to markup
Pick Markup to margin if you know how much you add to cost. Pick Margin to markup if you know the share of the price you want to keep.
Markup or margin (%)
30%
Enter the percentage as a number, such as 30 for 30%, with up to two decimals. Use a markup on cost. If a supplier or a system quotes a markup on the selling price, that number is already a margin: pick Margin to markup.

Before you start

Which costs to put in the profit margin calculator

The result is only as complete as the costs you enter. These are the choices most sellers make.

Count these

5
  • Product or materialsYesThe basic cost of the item.
  • PackagingYesYou pay for it with every order.
  • Shipping you payYesIf buyers pay you for shipping, count that money as revenue too.
  • Marketplace and payment feesYesThey come out of every sale.
  • Refunds and returnsYesThey lower revenue or add cost, so use your usual rate.

Your call

2
  • AdvertisingIt dependsInclude it for a profit-after-ads view. Leave it out if you will use the margin to find break-even ROAS.
  • Your own timeYour choiceCounting it shows what you really earn. Leaving it out shows the margin on the goods.

Not per order

1
  • Rent, software and other fixed costsNot per orderPut them in a monthly view or a break-even calculation.

These are common choices, not rules. Pick one set, use it every time, and your results will be comparable.

Seen from above, hands tape shut a box that holds one finished order, next to a tape gun, bubble wrap, flat boxes and a parcel scale.
The box, tape, packing and postage for each order are costs. Count them in the profit margin calculator, or your margin looks too high.

The math

Profit margin and markup formulas

Revenue is the amount received. Included cost is the total you entered. The margin formula divides by revenue. The markup formula divides by cost. So the same profit gives two different percentages. In convert mode both are written as numbers (30 for 30%), and markup is always measured on cost.

Profit
revenue − included cost

Take the money you receive and subtract the costs you chose to include.

Profit margin (%)
profitrevenue × 100

Divide the profit by the revenue, then multiply by 100 to turn it into a percent. It tells you how many cents of every dollar you keep.

Markup (%)
profitincluded cost × 100

Divide the profit by the cost instead of the revenue, then multiply by 100. It tells you how much you added on top of what the item cost.

Margin from a markup (%)
markup(100 + markup) × 100

Think of the cost as 100 parts. The price is those 100 parts plus the markup. So the profit's share of the price is the markup divided by (100 + markup).

Markup from a margin (%)
margin(100 − margin) × 100

Think of the price as 100 parts. The margin is the profit part and the rest is cost, so divide the profit part by the cost part.

Price as a multiple of cost
1 + markup100 , or 100(100 − margin)

Multiply your cost by this number to get the price.

Excel and Google Sheets

Profit margin in Excel or Google Sheets

The same calculation works in Excel and Google Sheets. Put the headings in row 1 and the numbers in row 2.

D2=C2/A2
CellWhat it holdsEnter
A2Revenue80
B2Included cost52
C2Profit=A2-B2
D2Profit margin (format as %)=C2/A2
E2Markup (format as %)=C2/B2
F2Price for a 30% margin, rounded up to the cent=ROUNDUP(B2/(1-0.3),2)
G2Markup from the margin in D2 (format as %; matches E2)=D2/(1-D2)
H2A markup to convert (type it with the % sign)30%
I2Margin from the markup in H2 (format as %)=H2/(1+H2)
Format D2 and E2 as Percent. A cost of zero makes E2 show #DIV/0!, the same case this calculator calls undefined. Typing 30% stores 0.3, which is what the conversion formulas expect.

Example

Profit margin example, step by step

Take an illustrative sale of $80.00 where the included costs add up to $52.00. These are the calculator's starting numbers.

RevenueWhat the customer pays$80.00
Included costWhat you entered$52.00
Profit$80.00 − $52.00$28.00
Profit margin
35%
$28.00 ÷ $80.00 × 100
Markup
53.85%
$28.00 ÷ $52.00 × 100

Of every $1 of revenue, about 35¢ is left after the included costs. Measured against cost, the same $28.00 is a 53.85% markup.

Convert mode

Converting a percentage

In convert mode the calculator starts at a 30% markup. No dollar amounts are needed; the $100 row only checks the answer.

  1. Markup you enter30%
    Starting value
  2. Margin23.08%
    30 ÷ (100 + 30) × 100
  3. Price as a multiple of cost×1.3
    1 + 30 ÷ 100
  4. Check with dollars23.08%
    $100.00 cost, $130.00 price: $30.00 ÷ $130.00 × 100

Adding 30% to your cost keeps 23.08% of the price, not 30%. To keep 30% of the price you need a 42.86% markup.

Picture it

Where the $80.00 goes

From $80.00 of revenue to $28.00 of profit
35¢of every $1
Revenue $80.00Included cost −$52.00Profit $28.00

Same profit, two percentages

Margin and markup, side by side

The same $28.00 of profit inside a $80.00 sale
Included cost $52.00Profit $28.00
Margin: the blue part divided by the whole bar. $28.00 ÷ $80.00 = 35%.
Markup: the blue part divided by the gray part. $28.00 ÷ $52.00 = 53.85%.
Markup always runs ahead of margin
0%50%100%150%0%10%20%30%40%50%60%Markup for each marginEqual values35% margin = 53.85% markup

Margin · Markup

Three cases

More examples

Case / Revenue / Included cost / Profit / Margin / Markup
CaseRevenueIncluded costProfitMarginMarkup
One $38 order$38.00$22.40$15.6041.05%69.64%
A month of sales$12,400.00$9,300.00$3,100.0025%33.33%
The $80 item at 10% off$72.00$52.00$20.0027.78%38.46%

The order's cost is $12.00, $1.50, $5.50, $3.40: materials, packaging, postage and fees, all assumed for the example. The discount row keeps the $52.00 cost of the worked example.

Interpret

What your margin and markup mean

Margin and markup answer different questions

Margin tells you how much of each dollar you take in is left. Markup tells you how much you added on top of what the item cost. With a positive profit, markup is always larger than margin.

A negative result is a loss

If costs are above revenue the profit is negative. With $50.00 of revenue and $80.00 of cost, profit is -$30.00, margin is -60% and markup is -37.5%.

Margin cannot pass 100%

With no cost at all, you keep all of the revenue and the margin is 100%. Markup has no such limit, and with zero cost it is undefined because you cannot divide by zero.

A converted percentage fits any cost

Convert mode does not need a dollar amount. A 30% markup is a 23.08% margin on a $5 item and on a $5,000 one. This holds when the markup is on the same cost that the margin subtracts.

Convert from the number you set

Results are rounded to two decimals, so converting a result back can miss by a hundredth. A 30% markup gives a 23.08% margin, but 23.08% converts back to a 30.01% markup because it was rounded from 23.0769%.

Targets

What is a good profit margin?

There is no number that is good for every business. A margin is good when it pays for everything you have to cover and still leaves what you want to earn. Work backward from that.

  1. Start from the goodsWith $10,000.00 of monthly revenue and $6,500.00 of product, packaging, shipping and fees, profit is $3,500.00 and the margin is 35%.
  2. Subtract what you pay whatever you sellAdd $2,000.00 of rent, software and subscriptions. The cost is now $8,500.00, so $1,500.00 is left, which is 15% of revenue.
  3. Set the margin you needTo take home $2,500.00 a month on $10,000.00 of revenue, the goods must earn 45%. That is a better target than an average.
Margin needed on the goods
(fixed costs + profit you want)revenue × 100

Compare your margin with your own earlier months and between your products before you compare it with anyone else. Averages published elsewhere count different costs for different years, so this page quotes none.

Names

Gross, operating and net margin

These names describe how many costs were subtracted. The calculator gives whichever one matches the costs you enter. Enter only the cost of the goods you sold, and it works as a gross profit margin calculator.

A month with $10,000.00 of revenue
Revenue$10,000.00
minus the cost of the goods sold ($6,500.00)
Gross margin35%
minus operating costs such as rent and software ($2,000.00)
Operating margin15%
minus other items such as interest and taxes (not in this example)
Net marginNot shown

The income statement levels follow OpenStax Financial Accounting, listed under sources.

Avoid

Margin mistakes that change the answer

  1. Mixing units or periods

    Use revenue and cost for the same item or the same period. Monthly revenue with a per-item cost gives a result that means nothing.

  2. Leaving out costs

    Fees, shipping you pay and packaging all lower profit. If they are not in the included cost, the margin looks better than your real one.

  3. Treating a markup as a margin

    Adding 40% to a $36.00 cost gives a price of $50.40, but the margin on that price is only 28.57%. To reach a margin you want, work from the price instead.

    Wrong
    40% markup:
    $50.40 price, 28.57% margin
    Right
    40% margin:
    $60.00 price
One handmade mug stands on a counter, with shelves full of the same mugs in boxes behind it.
Compare like with like: the price of one mug with the cost of one mug, or a month of sales with a month of costs.

Look it up

Quick reference tables

If your margin is / Your markup is / Price = cost ×
If your margin isYour markup isPrice = cost ×
10%11.11%1.1111
20%25%1.25
25%33.33%1.3333
30%42.86%1.4286
40%66.67%1.6667
50%100%2
60%150%2.5

From the conversion formulas above. Percentages are rounded to two decimals and multiples to four.

If your markup is / Your margin is / Price = cost ×
If your markup isYour margin isPrice = cost ×
10%9.09%1.1
20%16.67%1.2
25%20%1.25
30%23.08%1.3
40%28.57%1.4
50%33.33%1.5
75%42.86%1.75
100%50%2
150%60%2.5
200%66.67%3

To find the price that gives a target margin, use the Product Pricing Calculator under Related. It has its own table of prices for common targets.

Limits

Costs and limits this margin math ignores

  • Only the costs you enter are subtracted. No platform fees, taxes or overhead are added automatically.
  • Revenue must be above $0. Cost can be $0.
  • Amounts accept up to two decimal places and up to $1 billion. Money is handled in whole cents, and percentages show up to two decimals.
  • It is a calculation, not accounting, tax or financial advice.
  • It runs in your browser. Nothing you enter is saved or sent anywhere.
  • Convert mode accepts a markup from 0% to 10,000% and a margin from 0% to 99.99%, with up to two decimals. A 100% margin would mean zero cost, so it has no markup. Negative percentages are not accepted there; use price and cost for a loss.
  • The price multiple shows up to four decimals. On a $1,000 cost, ×1.4286 gives $1,428.60, while $1,000 ÷ 0.70 rounded up to the cent is $1,428.58. For an exact price, use the Product Pricing Calculator.

Questions

Questions

Why are my margin and markup different?

Margin is profit divided by revenue. Markup is profit divided by cost. The profit in dollars is the same, but the denominator changes the percentage. Margin vs markup: how to calculate each

Can the margin be negative or above 100%?

It can be negative when costs are above revenue. It cannot go above 100% unless cost were negative, which the calculator does not accept.

How do I find the price that gives a target margin?

Write the margin you want as a decimal and take it away from 1. Divide the cost by the result. Then round up to the next cent, so the margin does not fall below your target. Use the Product Pricing Calculator

Does it include marketplace fees?

Not on its own. Add the fees you pay to the included cost. For Etsy US orders there is a calculator that works out the fees for you. Open the Etsy Fee & Profit Calculator (US)

Why does my margin drop when I give a discount?

The cost stays the same while revenue falls, so every dollar of discount comes straight out of profit. A 10% discount takes the $80.00 example to $72.00, profit falls from $28.00 to $20.00, and margin falls from 35% to 27.78%.

How do I get a 30% margin on a $50.00 cost?

Divide the cost by 0.70. That gives $71.43, which leaves $21.43 of profit, rounded up to the next cent. The quick reference tables show other target margins.

How do I calculate profit margin in Excel or Google Sheets?

Put revenue in A2 and cost in B2, then use =(A2-B2)/A2 and format the cell as a percentage. The spreadsheet section above lists every formula, including markup and a target price.

Is markup based on cost or on the selling price?

On this page markup is always measured on cost: selling price minus purchase price, divided by purchase price, times 100, as OpenStax defines it. Some retailers quote a markup on the selling price instead. The University of Maine Cooperative Extension notes that the retail trade calls that number a margin. So if someone quotes a 30% markup on retail, convert it as a 30% margin.

What margin does keystone pricing give?

Keystone pricing doubles the wholesale price. Doubling is a 100% markup, which is a 50% margin. On a $20.00 cost, the price is $40.00, and the $20.00 of profit is half of that price.

Can I convert a gross margin to a markup?

Yes, as long as the markup is on the same cost. Gross margin is net sales minus the cost of goods sold, divided by net sales; Shopify's profit reports use ([net sales − cost] ÷ net sales) × 100. A 40% gross margin converts to a 66.67% markup on the cost of goods sold, not on all your costs.

Sources

Sources and review

Sources5 official pages, each read on the date shownShow allHide
  1. Shopify profit reportshelp.shopify.com · Read

    Definitions of profit and margin as used in a store report, and gross margin as (net sales − cost) ÷ net sales × 100. This page is not a Shopify fee estimate.

  2. OpenStax Contemporary Mathematics 6.2: discounts, markups and sales taxopenstax.org · Read

    How markup is defined on cost, and price = cost × (1 + markup).

  3. OpenStax Principles of Marketing 18.3: retailing strategy decisionsopenstax.org · Read

    Markup as (selling price − purchase price) ÷ purchase price × 100, keystone pricing as doubling the wholesale price, and gross margin as net sales minus the cost of goods sold, shown as a share of net sales.

  4. University of Maine Cooperative Extension, Bulletin #3000: Basic Pricing Strategies for Small Businessesextension.umaine.edu · Read

    Markup can be quoted on cost or on the selling price; the retail trade calls a markup on the selling price a margin.

  5. OpenStax Financial Accounting 6.6: multi-step income statementsopenstax.org · Read

    Gross margin, income from operations and net income as the successive levels of an income statement.

The page text was last updated on October 25, 2026 and the sources were last checked on October 7, 2026. Example figures are illustrative and were made with the same formulas as the calculator.