Margin Calculator

Easily calculate your profit margins, revenue, or costs.

$
$

Cost

$0.00

Revenue

$0.00

Gross Profit

$0.00

Gross Margin

0.00%

Frequently Asked Questions

1. What is a margin calculator? +

A margin calculator is a business tool used to determine the gross profit and profit margin of a product or service. It helps you understand how much you keep from each sale after deducting the costs.

2. How is gross margin calculated? +

Gross margin is calculated by subtracting the cost of goods sold (COGS) from total revenue, then dividing that number by the total revenue. The formula is: ((Revenue – Cost) / Revenue) × 100.

3. What is the difference between margin and markup? +

Margin shows your profit as a percentage of your revenue (sales price), while markup shows your profit as a percentage of your cost. Margin is always a smaller percentage than markup for the same transaction.

4. What is a “good” profit margin? +

A good profit margin varies wildly by industry. As a general rule of thumb, a 10% net profit margin is considered average, 20% is considered high (or “good”), and 5% is low. However, SaaS companies usually have much higher margins than grocery stores.

5. How do I calculate revenue if I know my cost and desired margin? +

To find the required revenue (selling price) for a specific margin, use the formula: Revenue = Cost / (1 – (Margin% / 100)). Our calculator’s second option handles this math for you automatically!

6. Why is profit margin important for a business? +

Profit margin indicates your financial health and pricing strategy efficiency. It tells you whether you are managing your costs effectively and pricing your products high enough to sustain your operations and generate wealth.

7. Can profit margins be negative? +

Yes. If your costs exceed your revenue, your profit margin will be negative. This means you are losing money on the sale of that product or service and need to either raise prices or cut costs.

8. How can I improve my profit margins? +

You can improve margins by raising your prices, negotiating cheaper material costs from suppliers, reducing overhead expenses, optimizing operations to save time, or upselling higher-margin products to existing customers.

9. Is net margin the same as gross margin? +

No. Gross margin only accounts for the direct costs of producing the goods (COGS). Net margin accounts for all business expenses, including taxes, rent, salaries, and interest. Net margin is your final “bottom line.”

10. How often should I calculate my margins? +

You should review your gross margins every time you price a new product or experience a change in supplier costs. Overall business net margins are usually reviewed monthly or quarterly during financial check-ins.

Margin Calculator

A margin calculator shows how much of each sale you keep after costs. You enter a selling price and a cost, and it returns profit in dollars and as a percentage of revenue.

That percentage is your profit margin. It is not the same as markup. Margin divides profit by the selling price. Markup divides the same profit by cost. Mix them up and you can underprice a product without noticing.

What a Margin Calculator Measures

A margin calculator is a tool that converts cost and revenue into profit and profit margin. Most versions also convert margin to markup, or calculate the selling price required to hit a target margin.

In everyday use, “margin” usually means gross profit margin: what is left after the direct cost of the product or service, before rent, payroll, ads, interest, and taxes. Some calculators also estimate net margin if you add those extra costs.

The core idea is simple. Profit is a dollar amount. Margin is that dollar amount expressed as a share of the selling price.

If you sell an item for $100 and it costs $60, profit is $40. The margin is 40%, because $40 is 40% of $100. The markup is about 66.7%, because $40 is 66.7% of $60. Same sale. Different bases.

Profit Margin Formulas a Calculator Uses

You can run the same math by hand. A calculator just reduces the chance of mixing up the denominator.

Profit:

Profit=RevenueCost\text{Profit} = \text{Revenue} – \text{Cost}

Profit margin:

Profit margin=RevenueCostRevenue×100\text{Profit margin} = \frac{\text{Revenue} – \text{Cost}}{\text{Revenue}} \times 100

Markup:

Markup=RevenueCostCost×100\text{Markup} = \frac{\text{Revenue} – \text{Cost}}{\text{Cost}} \times 100

Selling price when you know cost and a target margin (as a decimal, so 25% is 0.25):

Selling price=Cost1Target margin\text{Selling price} = \frac{\text{Cost}}{1 – \text{Target margin}}

Conversion between the two percentages (use decimals):

Margin=Markup1+Markup\text{Margin} = \frac{\text{Markup}}{1 + \text{Markup}}

Markup=Margin1Margin\text{Markup} = \frac{\text{Margin}}{1 – \text{Margin}}

Margin cannot reach 100% unless cost is $0. Markup can exceed 100%. That is one reason the two numbers look so different on the same product.

How to Calculate Profit Margin Step by Step

You need two numbers for a basic margin: selling price (or total revenue) and cost.

  1. Write down the selling price or the period’s revenue. Use the amount the customer pays, after discounts and returns when you have them.
  2. Write down the matching cost. For a product, that is usually what you paid to buy or make it. For a job, use direct labor, materials, and other costs tied to that job.
  3. Subtract cost from revenue to get profit.
  4. Divide profit by revenue.
  5. Multiply by 100 to get the margin percentage.

Example: You sell a lamp for $80. It costs $48.

  • Profit: $80 − $48 = $32
  • Margin: $32 ÷ $80 = 0.40, or 40%
  • Markup: $32 ÷ $48 = 0.667, or 66.7%

If you sell 25 lamps at the same price and cost, revenue is $2,000, cost is $1,200, profit is $800, and the margin is still 40%. The percentage does not change just because volume changes. The dollars do.

Gross, Operating, and Net Margin

A single “profit margin” number is incomplete until you know which costs were subtracted.

Gross margin

Gross margin uses only the cost of goods sold (COGS), or the direct cost of delivering the service.

Gross margin=RevenueCOGSRevenue×100\text{Gross margin} = \frac{\text{Revenue} – \text{COGS}}{\text{Revenue}} \times 100

It answers: after paying for the product or job itself, how much of each sales dollar is left to cover the rest of the business?

Operating margin

Operating margin starts with gross profit, then subtracts operating expenses such as rent, salaries, utilities, insurance, and marketing. It leaves out interest and income taxes.

Operating margin=Operating incomeRevenue×100\text{Operating margin} = \frac{\text{Operating income}}{\text{Revenue}} \times 100

A healthy gross margin with a weak operating margin often means overhead is high relative to sales.

Net margin

Net margin uses net income: what remains after every expense, including interest and taxes.

Net margin=Net incomeRevenue×100\text{Net margin} = \frac{\text{Net income}}{\text{Revenue}} \times 100

This is the figure people usually mean when they ask, “How profitable is the business?” Gross margin can look strong while net margin is thin, or even negative, once overhead and taxes are included.

Worked example for one month:

  • Revenue: $20,000
  • COGS: $8,000
  • Operating expenses: $7,500
  • Interest and taxes: $1,000

Gross profit is $12,000, so gross margin is 60%. Operating income is $4,500, so operating margin is 22.5%. Net income is $3,500, so net margin is 17.5%. All three are useful. They answer different questions.

Margin vs. Markup: Why the Mix-Up Costs Money

Markup is the percentage you add on top of cost to set a price. Margin is the share of the final price that is profit. For any profitable sale, markup is the larger percentage because cost is smaller than price.

That gap is where pricing errors start. Many owners say they want a 40% margin, then add 40% to cost. That is a 40% markup, not a 40% margin.

TargetIf you treat it as markup on a $100 costActual marginPrice needed for a true 40% margin
20%$120 price, $20 profit16.7%$125.00
25%$125 price, $25 profit20.0%$133.33
30%$130 price, $30 profit23.1%$142.86
40%$140 price, $40 profit28.6%$166.67
50%$150 price, $50 profit33.3%$200.00

A 100% markup (doubling cost) is a 50% margin. A 25% margin requires a 33.3% markup. If you need a 40% margin on a $100 cost, divide $100 by 0.60. The price is $166.67, not $140.

Use markup when you are building a price from cost. Use margin when you are reading an income statement, comparing products, or checking whether a price covers overhead.

How to Set a Selling Price With a Target Margin

Decide the margin first, then solve for price. Do not add the margin percentage to cost.

  1. Add up the true unit cost. Include freight, payment-processing fees, packaging, and any labor that belongs to that unit or job if those costs are real and recurring.
  2. Choose a target gross margin that can still cover operating expenses after volume is factored in.
  3. Convert the target to a decimal.
  4. Divide cost by (1 − target margin).

Example: Unit cost is $36. You want a 40% gross margin.

Price=3610.40=360.60=$60\text{Price} = \frac{36}{1 – 0.40} = \frac{36}{0.60} = \$60

Gross profit is $24. $24 ÷ $60 = 40%.

If card fees are 3% of the selling price, that fee is not in the $36 cost. Either raise the cost estimate or raise the target margin so the fee does not eat the planned profit. A calculator that ignores fees, shipping, returns, and discounts will overstate margin.

For a service job, use the same structure. If a landscaping job costs $1,800 in labor, materials, and equipment, and you want a 35% gross margin, the bid is $1,800 ÷ 0.65, or about $2,769.

What a “Good” Margin Depends On

There is no single healthy margin for every US business. Retail, restaurants, construction, software, and professional services carry different cost structures. A high gross margin can still produce a low net margin if rent, payroll, or ads are large.

Compare your numbers in this order:

  • Against your own history for the same product, job type, or season
  • Against similar products inside your catalog
  • Against published industry ranges only as a rough check, not a grade

Watch the gap between gross and net margin. If gross margin is stable but net margin is falling, the problem is usually overhead, financing, or taxes, not the product cost alone. If gross margin is falling, look at supplier prices, discounts, waste, returns, and selling prices.

Contribution margin is a related figure some calculators include. It is revenue minus variable costs only. It shows how much each extra sale contributes toward fixed costs. That is useful for break-even planning, but it is not the same as net profit.

Common Margin Calculator Mistakes

Using markup as if it were margin – This is the most expensive mix-up. You think you have a 30% margin. You actually have about 23% if you marked cost up by 30%.

Leaving costs out – Wholesale cost is not always the full cost. Shipping inbound, packaging, marketplace fees, warranty work, and shrinkage all reduce margin.

Comparing the wrong margin type – A 50% gross margin on one product is not comparable to a 12% net margin for the whole company.

Ignoring discounts after the fact – A list price of $100 with a 15% discount is a $85 sale. If cost is $50, margin is $35 ÷ $85, or 41.2%, not 50%.

Assuming volume will fix a thin margin – More sales at a loss, or at a margin that cannot cover fixed costs, make the hole larger.

Treating one month as the whole story – Returns, seasonal buying, and one-time expenses can swing a single period. Look at several periods before you change prices.

What to Do With the Result

Once you know the margin, decide what the number is for.

If you are pricing a new item, start with full unit cost and a target gross margin that leaves room for operating costs. If you are reviewing an existing catalog, sort items by gross margin and by dollar profit. A low-margin item that sells in high volume can still matter. A high-margin item that almost never sells may not.

If net margin is weak, do not only raise prices. Check whether discounts, fees, unused capacity, or overhead are the real leak. Recalculate after any supplier increase, shipping change, or new selling fee. Those shifts change margin even when the sticker price stays the same.

FAQs About Margin Calculator

How do I convert markup to margin?

Use the decimal form of markup. Margin = markup ÷ (1 + markup). A 50% markup is 0.50 ÷ 1.50 = 0.333, or 33.3% margin. A 100% markup is 0.50, or 50% margin.

Can profit margin be negative?

Yes. If cost is higher than revenue, profit is negative and so is margin. That can happen on a single product, a discounted order, or an entire period when expenses exceed sales.

Is margin calculated on the selling price before or after tax?

For business profit margin, use the revenue the business records, which is generally the amount before sales tax you collect for a state or local government. Sales tax collected from customers is not your revenue. Income tax is an expense that affects net margin, not gross margin.

What is the difference between margin and markup on a $60 cost and $100 price?

Profit is $40 either way. Margin is $40 ÷ $100 = 40%. Markup is $40 ÷ $60 ≈ 66.7%. The dollars match. The percentages do not.

Conclusion

A margin calculator is only as useful as the costs you put in and the formula you choose. Margin is profit divided by selling price. Markup is profit divided by cost. Gross margin stops at direct cost. Net margin keeps going until every expense is counted.

Run the numbers on the products or jobs you sell most, then set prices from a target margin rather than by adding that same percentage to cost. That single habit is what makes a margin calculator worth using.

Disclaimer: This article is general educational information about profit margin and markup calculations for US readers. It is not accounting, tax, legal, or financial advice. The right costs, margin targets, and prices depend on your business, industry, contracts, and tax situation. Check figures against your own records and speak with a qualified accountant or tax professional before making pricing or reporting decisions.