Finance calculators

Margin Calculator

Updated Sep 1, 2026 By Jehan Wadia
Rate Formulas
Enter any two values below. The remaining fields will calculate automatically in real time.
$
Cost of goods/services
$
Selling / sale price
$
Revenue minus Cost
%
Profit ÷ Revenue × 100
%
Profit ÷ Cost × 100

Calculation Summary
Cost $50.00
Revenue $80.00
Profit $30.00
Margin % 37.50%
Markup % 60.00%
37.50%
0% 100%
60.00%
0% 200%+
Margin vs. Markup Reference Table
Margin % Markup % Multiplier

Introduction

Margin is the percentage of revenue that becomes profit after covering costs. It tells you how much money you actually keep from every dollar you earn. A 40% margin means you keep 40 cents of profit for every dollar of sales. Knowing your margin helps you set prices, control costs, and understand whether your business is truly making money.

This margin calculator lets you find cost, revenue, profit, margin percentage, and markup percentage all at once. Just enter any two values, and the calculator fills in the rest instantly. You can also switch between currencies, adjust decimal places, and add a tax or VAT rate to see how taxes affect your revenue. A built-in chart shows the split between cost and profit, and a reference table makes it easy to compare margin and markup side by side.

How to use our Margin Calculator

Enter any two values from the fields below, and the calculator will instantly figure out the remaining three values for you, including your profit, margin percentage, and markup percentage.

Cost: Type in how much you paid for your product or service. This is your total cost of goods before any profit is added.

Revenue: Enter your selling price, which is the total amount a customer pays you for the product or service.

Profit: Enter the dollar amount you earn after subtracting cost from revenue. If you fill in cost and revenue, this is calculated for you.

Margin (%): Enter your profit margin as a percentage. This shows what portion of your revenue is actual profit. It is calculated as profit divided by revenue, times 100.

Markup (%): Enter your markup as a percentage. This shows how much you added on top of your cost to reach your selling price. It is calculated as profit divided by cost, times 100.

Currency: Use the dropdown at the top to pick your currency, such as USD, EUR, GBP, or other options, so all money values display in the right format.

Decimals: Choose how many decimal places you want shown in your results, from zero up to four.

Tax / VAT / GST (optional): Toggle this on if you want to include a tax rate. Enter your tax percentage, and the calculator will show you the tax amount and your total revenue after tax is applied.

What Is Profit Margin?

Profit margin is the percentage of revenue that remains as profit after you subtract your costs. It tells you how many cents of profit you earn for every dollar of sales. For example, a 40% margin means you keep $0.40 in profit for every $1.00 in revenue. Business owners, freelancers, and financial analysts all use margin to measure how efficiently a business turns sales into actual earnings.

Margin vs. Markup: What's the Difference?

Margin and markup are related but not the same thing, and confusing them is one of the most common pricing mistakes in business. Margin is your profit divided by revenue (the selling price). Markup is your profit divided by cost. Because cost is always smaller than revenue (when you're profitable), markup will always be a larger number than margin for the same transaction.

Here's a quick example. You buy a product for $50 and sell it for $80. Your profit is $30. Your margin is $30 ÷ $80 = 37.5%. Your markup is $30 ÷ $50 = 60%. Same deal, two different percentages. If you set prices using a 60% figure thinking it's your margin when it's actually your markup, you'll end up earning far less profit than you planned.

How to Calculate Margin

The core formulas are simple:

  • Profit = Revenue − Cost
  • Margin % = (Profit ÷ Revenue) × 100
  • Markup % = (Profit ÷ Cost) × 100

The calculator above lets you enter any two values (cost, revenue, profit, margin, or markup), and it solves for the rest. This makes it easy to work backward from a target margin to find the right selling price, or to check what margin you're actually earning on a known cost and price.

Why Margin Matters for Your Business

Margin is one of the clearest indicators of business health. A high margin means you have more room to cover operating expenses like rent, payroll, and marketing while still turning a profit. A low margin means even a small increase in costs or a slight dip in sales can push you into a loss. Tracking how much it costs to bring in each customer using a CAC calculator alongside your margin data gives you a more complete picture of profitability.

Different industries have very different typical margins. Grocery stores often operate on thin margins of 1–3%. Software companies can reach margins of 60–80% or more. Knowing the standard margin for your industry helps you set realistic goals and spot problems early.

Tips for Using Margin in Pricing Decisions

  • Start with your target margin. Decide the margin you need, then calculate the selling price from your cost. This keeps pricing consistent and protects your profits.
  • Don't forget taxes. Use the tax toggle in the calculator to see how sales tax, VAT, or GST affects your revenue. Tax doesn't change your margin directly, but it does change what the customer pays.
  • Watch margin trends over time. A slowly shrinking margin can signal rising costs, too many discounts, or a shift in your product mix, and those are all things you want to catch early. Monitoring the percent change in your margin from period to period is a straightforward way to spot these shifts.
  • Use the reference table. The margin-to-markup conversion table included above gives you a quick way to translate between the two without doing the math each time.
  • Factor in financing costs. If you're funding inventory or operations with debt, borrowing costs eat into your margins over time.
  • Consider the bigger financial picture. Healthy margins contribute directly to your overall net worth.

Formulas used

Profit
\text{Profit} = \text{Revenue} - \text{Cost}
Margin Percentage
\text{Margin\%} = \frac{\text{Profit}}{\text{Revenue}} \times 100
Markup Percentage
\text{Markup\%} = \frac{\text{Profit}}{\text{Cost}} \times 100
Revenue from Cost and Margin
\text{Revenue} = \frac{\text{Cost}}{1 - \dfrac{\text{Margin\%}}{100}}
Cost from Revenue and Margin
\text{Cost} = \text{Revenue} \times \left(1 - \frac{\text{Margin\%}}{100}\right)

Frequently asked questions

What is a good profit margin for a small business?

A good profit margin depends on your industry. Most small businesses aim for a net profit margin between 7% and 10%. Service businesses like consulting can hit 15–20% or higher because they have low material costs. Retail and food businesses often run on thinner margins of 2–5%. The key is to compare your margin to others in your same industry, not to businesses in general.

Can margin ever be higher than 100%?

No. Profit margin can never be 100% or higher. Margin is profit divided by revenue, and your profit can never equal or exceed your revenue because there is always some cost involved. A 100% margin would mean your cost was zero, which isn't realistic. Markup, on the other hand, can easily go above 100% because it is based on cost, not revenue.

What is the difference between gross margin and net margin?

Gross margin only subtracts the direct cost of making or buying your product from revenue. Net margin subtracts all expenses, including rent, salaries, taxes, and interest. This calculator computes gross margin. Net margin is always lower than gross margin because it includes more costs. Both are useful, but net margin gives a fuller picture of overall profitability.

How do I convert markup to margin?

Use this formula: Margin % = Markup % ÷ (100 + Markup %) × 100. For example, a 50% markup equals 50 ÷ 150 × 100 = 33.33% margin. You can also use the reference table built into the calculator to quickly look up common conversions without doing the math yourself.

How do I convert margin to markup?

Use this formula: Markup % = Margin % ÷ (100 − Margin %) × 100. For example, a 25% margin equals 25 ÷ 75 × 100 = 33.33% markup. The reference table in the calculator lists many common margin-to-markup conversions for quick lookup.

Does the tax setting change my profit margin?

No. The tax toggle calculates sales tax, VAT, or GST on top of your revenue. It shows you what the customer pays after tax and how much goes to tax. But it does not change your profit or margin figures. Those are based on your cost and pre-tax revenue. Tax is money collected for the government, not income for your business.

What does a negative margin mean?

A negative margin means you are losing money on every sale. Your cost is higher than your revenue, so your profit is negative. For example, if you buy something for $60 and sell it for $50, your margin is −20%. This is not sustainable and means you need to either raise your price or lower your costs.

Why is markup always higher than margin?

Markup is calculated by dividing profit by cost, while margin divides profit by revenue. Revenue is always larger than cost when you are making a profit. Since you are dividing the same profit number by a smaller number (cost), the markup percentage comes out bigger. They describe the same profit from two different angles.

What margin should I aim for to cover operating expenses?

Your gross margin needs to be high enough to pay for all your operating expenses like rent, payroll, marketing, and utilities, with money left over as net profit. Add up your total monthly operating expenses, divide by your monthly revenue, and multiply by 100. Your gross margin must be higher than that percentage, or you will lose money overall.