Free, No Signup, Private

Margin Calculator: See Your Real Profit on Every Sale

A margin is the share of your selling price that stays as profit after costs, and it is the number that decides whether a price actually works. This margin calculator turns your cost and revenue into your profit margin, gross margin, markup and profit in seconds, so you can price with your eyes open.

No signup. Your numbers never leave your browser.

Margin Calculator

Enter your cost and revenue to see your profit, margin, and markup.

Your profit$0.00
Result
Profit margin
Markup

Enter cost and revenue in the same frame, either per unit or in total for a period. If you add units sold, the totals scale from your per unit figures. Results are estimates for planning. They do not include your taxes, which depend on your business structure.

What Is a Margin and Why Does It Run Your Pricing?

A margin is your profit measured against your selling price. If you sell something for $100 and it cost you $60, your profit is $40 and your margin is 40 percent, because $40 of every $100 your customer pays is profit and the other $60 replaces your cost. Accountants call this same figure gross margin when the cost is the cost of goods sold, and your income statement reports it that way.

Why does the base matter so much? Because every bill you pay, from rent to card fees to your own salary, is paid out of that margin share of sales. A store with a 10 percent margin must sell ten dollars of goods to keep one dollar before overhead. A consultant with a 60 percent margin keeps sixty cents of every dollar billed. Same formula, very different room to breathe.

So what is the single most common pricing error behind thin profits? It is mixing up margin with markup, which the comparison section below takes apart with real numbers. First, let us get your own figures on the screen.

How Do You Use This Margin Calculator?

  1. Enter your cost. For a product, use the full cost of one unit: what you paid for it or to make it, plus packaging and the shipping you pay to receive it. For a service, use your direct costs for the job.
  2. Enter your revenue. For a product, that is the selling price of one unit. For a period view, enter total cost and total revenue for the same period instead.
  3. Add units sold if you want totals. The widget multiplies your per unit profit by the units and shows total cost, total revenue and total profit for the run.
  4. Press Calculate Margin and read three numbers: your profit in dollars, your margin percent, and your markup percent.
  5. Compare the margin with the markup before you quote anyone. If a supplier, client or partner gives you a percent, ask which base it uses. The two numbers describe the same profit and they are never equal.

The Formulas Behind the Numbers

There are three formulas on this page, and the margin calculator runs all three from the same two inputs.

Profit comes first. Profit equals revenue minus cost. Everything else is this one profit figure measured against two different bases.

Margin percent equals profit divided by revenue, times 100. Revenue is the bigger number, so margin is always the smaller of the two percents, and it can never reach 100 percent, because profit can never be bigger than the price itself. When your cost is only the cost of goods sold, the result is your gross margin, which is why many owners search for a gross margin calculator when what they want is this same per product view.

Markup percent equals profit divided by cost, times 100. Cost is the smaller number, so markup is always the bigger percent, and it can pass 100 percent easily. Double your cost and your markup is 100 percent, while your margin on that same sale is 50 percent.

Working backwards matters just as much. To find the price that gives you a target margin, divide your cost by one minus the target margin written as a decimal. A $30 cost and a target margin of 40 percent gives $30 divided by 0.60, which is a $50 price. Check it: profit is $20, and $20 divided by $50 is exactly 40 percent. Multiplying the cost by one plus the margin instead is the classic error, and the mistakes section below shows what it costs.

The widget follows the same definitions the IRS uses on business returns, where gross profit is sales minus the cost of goods sold, as set out in Publication 334. It does not subtract rent, wages, advertising or taxes. Those belong to net margin, a wider measure this page explains in the questions below so you never confuse the two.

Worked Example: Dana Prices a Candle for Her Ohio Shop

Dana sells handmade candles from a small shop in Ohio. Her best seller costs her $18 a unit once she counts wax, the jar, fragrance, the label and the box. She is deciding between a $45 shelf price and a lower one, so she runs both through the calculator.

At $45, her profit is $27 a candle. Her margin is $27 divided by $45, which is 60 percent. Her markup is $27 divided by $18, which is 150 percent. In a month when she sells 200 candles, that is $9,000 of revenue, $3,600 of cost and $5,400 of gross profit, and the margin holds at 60 percent because margin does not change with volume.

Now the version that quietly hurts sellers. Dana wants a 60 percent margin, but instead of using the target price formula she adds 60 percent to her cost, the way you would with a markup. That gives a price of $28.80. Her profit is $10.80 a candle and her real margin is $10.80 divided by $28.80, which is only 37.5 percent. She gives up $16.20 of profit on every single candle and never sees it happen, because the register still rings and the shelf still empties. This is the exact confusion owners describe again and again in small business forums, and it is why this page shows margin and markup side by side on every result.

Worked Example: Marcus Checks the Margin on a Design Package

Marcus is a freelance brand designer in Texas. A logo package takes him ten hours, and the direct costs he pays out of pocket, stock assets, font licenses and a subcontracted illustration, come to $850. He bills the client $2,000 and wants to know what he actually keeps.

His profit is $1,150. His margin is $1,150 divided by $2,000, which is 57.5 percent. His markup is $1,150 divided by $850, which is about 135.29 percent. On paper, a healthy service margin.

Then Marcus asks the harder question: what if his own time counts as a cost? Ten hours at the $75 an hour he would charge for rush work is $750. Add that to his direct costs and his full cost is $1,600. His profit falls to $400 and his margin falls to 20 percent. Nothing about the client, the price or the work changed. Only the honesty of the cost figure changed. Whatever you count as cost, count it the same way every time, or your margins will flatter you in good months and ambush you in slow ones.

How Margin Moves as Your Price Moves

The table below holds Dana's cost steady at $40 a unit and moves only the price, so you can watch the two percents pull apart.

Selling priceProfitMarginMarkup
$50$1020 percent25 percent
$60$2033.33 percent50 percent
$80$4050 percent100 percent
$100$6060 percent150 percent
$120$8066.67 percent200 percent

Read it from the bottom up and the pattern jumps out. Markup climbs fast because it is measured against the small number, your cost. Margin climbs slowly and leans toward a ceiling it can never cross, because it is measured against the price itself. A profit margin calculator that shows only one of the two hides this gap, and the gap is exactly where underpricing lives.

Margin vs Markup: Same Profit, Two Different Percents

This comparison is the heart of the page, because most pricing trouble starts here. Margin and markup begin with the same profit and then divide it by different numbers.

MarginMarkup
What it divides byYour selling price (revenue)Your cost
Formula in wordsProfit divided by revenue, times 100Profit divided by cost, times 100
Can it pass 100 percent?NeverOften
Best used forJudging whether a price or a whole product line earns its keepAdding an amount on top of cost at the counter or in a quote
Same sale, cost $100, price $15033.33 percent50 percent

Converting between the two is simple once you see the pattern. To turn a markup into a margin, divide the markup by one plus the markup. A markup of 50 percent becomes 0.50 divided by 1.50, a margin of 33.33 percent. To turn a margin into a markup, divide the margin by one minus the margin. A margin of 40 percent becomes 0.40 divided by 0.60, a markup of 66.67 percent.

If your markup isYour margin is
25 percent20 percent
50 percent33.33 percent
75 percent42.86 percent
100 percent50 percent
150 percent60 percent
200 percent66.67 percent
300 percent75 percent

One warning before you use the tables. Some sellers go looking for a markup calculator when their real question is about margin, and some do the reverse. The tool does not care which word you arrived with. It shows you both percents for your sale, labeled, so the number you quote to a client or compare with a supplier is the one you actually mean.

What Is a Good Margin?

There is no single good margin, because margins ride on how a trade is built. Grocery stores sell at high volume on net margins of about 1 to 5 percent. Restaurants commonly keep about 3 to 9 percent at the net level, even when the gross margin on a plate looks rich. Retail gross margins often sit between 25 and 50 percent, and the net figure after rent and staff lands far lower. Service and freelance work runs higher, with gross margins of 60 to 80 percent in many trades, because the main cost is time rather than stock.

Two habits matter more than any benchmark. First, compare your margin with your own trade, not with a headline average across all industries. Second, watch your own margin over time. A margin that slips two or three points across a season usually means costs rose and your price did not, and that is a pricing conversation you want to have early. A profit margin calculator earns its keep when you run it every time a supplier changes a price, not once a year at tax time.

Common Mistakes That Shrink Your Margin

The first mistake is adding your target margin to your cost. A seller who wants a 30 percent margin and adds 30 percent to a $10 cost prices at $13, and the real margin on that sale is about 23 percent, not 30. To land a true 30 percent margin on a $10 cost, the price must be $10 divided by 0.70, about $14.29. Dana's example above shows the same slip costing $16.20 a unit.

The second mistake is leaving real costs out of the cost figure. Card processing fees of around 3 percent, platform commissions, packaging, returns and the shipping you absorb all come out of the same profit. One seller in the research priced from product cost alone while paying $15 a unit in overhead on a $40 cost, then wondered why a healthy looking markup still lost money. If a cost repeats on every sale, it belongs in the cost box.

The third mistake is comparing unlike numbers. A supplier quotes you a margin, your quote sheet works in markup, and the two figures get treated as the same percent in the same meeting. They never are. Convert before you compare, using the tables above.

The fourth mistake is pricing once and never again. Supplier prices, freight and fees creep up a few percent at a time, and each creep comes straight out of your margin when your selling price stands still. Run the margin calculator again whenever a cost changes, even a small one, and decide with fresh numbers whether the price moves or the margin takes the hit on purpose.

The fifth mistake is mixing frames: per unit figures in one box and monthly totals in the other. Cost and revenue must describe the same sale or the same period. If they do not, the percents that come out are fiction, no matter how clean they look.

Frequently Asked Questions About Margin

Subtract cost from revenue to get profit, then divide profit by revenue and multiply by 100. On a $100 sale with $60 of cost, profit is $40 and the margin is 40 percent. A margin calculator runs the same steps instantly and adds your markup beside it, which is where most hand math goes wrong. Run in per unit mode, it is also the gross margin calculator view most sellers are looking for.

Both start from the same profit. Margin divides profit by the selling price, and markup divides profit by the cost. Because the price is bigger than the cost, margin is always the smaller percent. A markup calculator starts from cost and builds up to a price, while a margin view starts from the price and asks how much of it you keep.

Because adding a percent to cost gives you a markup, not a margin. On a $10 cost, adding 30 percent sets a $13 price and a $3 profit, and $3 divided by the $13 price is a margin of about 23 percent. For a true 30 percent margin, divide the cost by 0.70 and charge about $14.29 instead.

A markup of 100 percent. Doubling a $100 cost gives a $200 price and $100 of profit, and $100 divided by $200 is a 50 percent margin. The rule runs markup equals margin divided by one minus the margin, so 0.50 divided by 0.50 is 1.00, or 100 percent.

No. Profit cannot be larger than the price itself, so margin always stays below 100 percent. Markup can pass 100 percent whenever profit is larger than cost, which is common in retail and food service. If a result ever shows a margin above 100 percent, the cost and revenue figures are almost certainly in mismatched frames, one per unit and one in total.

Not quite. Gross margin subtracts only the cost of goods sold, the direct cost of what you sold. Profit margin with no qualifier usually means net margin, which subtracts everything else as well: rent, wages, fees and taxes. The per product view on this page is a gross margin. Net margin is a whole business view you take from your books at the end of a period.

Every cost that repeats with each sale: the item itself or your direct labor, materials, packaging, platform commissions, card processing fees and any shipping you absorb. Leave rent and other fixed monthly costs out of a per unit margin, then check separately whether your total gross profit covers them. The Marcus example above shows how much the answer moves when your own time joins the cost figure.

It depends on the trade. Net margins of about 1 to 5 percent are normal in grocery, and about 3 to 9 percent in restaurants, while service businesses often hold far more because their costs are mostly time. Across many small businesses, a net margin between 10 and 20 percent is considered strong. Judge your figure against your own trade first, and against your own last season second.

Divide your cost by one minus the target margin written as a decimal. For a $30 cost and a target of 40 percent, divide $30 by 0.60 to get a $50 price. Never build the price by adding the margin percent to the cost. That produces a markup and quietly leaves you with a smaller margin than you planned.

Convert every quote onto one base before you compare it. A supplier margin of 40 percent equals a markup of about 66.67 percent, and your markup of 50 percent equals a margin of 33.33 percent. The conversion tables on this page do the swap, and opening the same sale in a markup calculator view helps when you are both looking at one set of figures.

Your price is below your cost, so every sale loses money before overhead even enters the picture. The calculator still shows the figures and states the loss in plain words. A negative margin on one deliberate loss leader can be a choice. A negative margin you find by accident is a price that needs to change today.

Yes. For services, revenue is what you bill and cost is what the job costs you directly: materials, subcontractors, tools or software bought for the job, and your own time if you choose to count it. Many freelancers run the figures both ways, once with paid costs only and once with their time included, because the gap between the two margins is the truest picture of the business.

Related Calculators

Price is only one side of what a small business keeps. Run the margin calculator for the sale in front of you, then use the tools below for the tax side of the same money. Whether you arrived looking for a profit margin calculator or a plain margin view, these three pages complete the picture, and the full set of business tools sits on our tax calculators hub.

  • S Corp Tax Calculator: see how electing S corp status could change the tax on the profit your margin produces.
  • Self Employment Tax Calculator: work out the 15.3 percent self employment tax on your net earnings if you run the business yourself.
  • Percentage Calculator: handle the everyday percent questions behind pricing, from percent change to percent of a total.

Every price you set is a bet on your costs, and your margin is where that bet is settled. Run each new product, package and quote through the margin calculator above before you commit to it, compare the margin with the markup out loud, and your prices will start keeping the share you actually planned to keep.

Disclaimer

Disclaimer: This calculator is for education only and is not financial, tax or legal advice. Margin figures are estimates based on the cost and revenue you enter, and your real results depend on your full costs, fees and taxes. Talk with a qualified accountant or tax professional before making pricing or filing decisions for your business.

Sources: IRS, Publication 334, Tax Guide for Small Business (gross profit and cost of goods sold definitions); IRS, Business Taxes (gross receipts and cost of goods sold); US Small Business Administration, Business Guide (pricing and profitability planning).

By Marcus. Published November 8, 2026. Last updated November 8, 2026. Reviewed by Marcus.