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, with at least one of them a cost, revenue or profit amount, 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, with at least one of them a cost, revenue or profit amount, 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 before tax, which is the amount a customer pays you for the product or service before any sales tax, VAT or GST is added.
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.1
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.2
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 can lead you to set prices lower than you meant to. Margin is your profit divided by revenue (the selling price).1 Markup is your profit divided by cost.2 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, as long as at least one of the two is a cost, revenue or profit amount. 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 operate on thin margins: the average net margin for US grocery and food retailers was 1.32% in January 2026.3 Software companies keep much more of each sale, with an average net margin of 25.49% for system and application software.3 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. Sales taxes imposed on the buyer, which you collect and pay over to a state or local government, are not income.1 A tax like that doesn't change your margin, but it does change what the customer pays. A sales tax imposed on you as the seller is different, because the amount you collect from the buyer is part of your gross receipts.1
- 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 net margin over time.4
- Consider the bigger financial picture. Healthy margins contribute directly to your overall net worth.