Profit Margin Calculator

Enter cost price and selling price to get your profit margin.

Profit:
Profit Margin:

Advertisement

A profit margin calculator takes two numbers you already know — what something costs you and what it sells for — and turns them into the percentage of every sale you actually keep as profit. That single number is one of the clearest signals of business health: thin margins leave no room for a slow month, while healthy margins fund growth, hiring, and the occasional mistake. This guide walks through the exact formulas behind the calculator, what a good margin looks like by industry, and how to use the result to price smarter.

How to Calculate Profit Margin With a Profit Margin Calculator

Whether you're pricing a single product or reviewing your whole business, the process is the same three-step calculation any margin calculator relies on.

Step 1: Find Your Cost of Goods Sold (COGS)

Add up every direct cost that goes into producing or delivering what you sell — materials, manufacturing costs, and the wages of anyone who touches the product before it ships. This total is your cost of goods sold, usually shortened to COGS. Leave out rent, marketing, and other overhead; those get factored in later when you calculate a net margin instead of a gross one.

Step 2: Calculate Your Net Profit Margin

Once you know your revenue — the total amount customers paid you — subtract COGS to get gross profit, then subtract everything else under operating costs (salaries, taxes, interest, amortization, and rent) to land on net profit. Divide net profit by revenue and multiply by 100 to get your net profit margin as a percentage.

  1. Add up your cost of goods sold and any other direct costs.
  2. Record your total revenue from the sale.
  3. Subtract cost from revenue to find profit, then divide profit by revenue and multiply by 100.

Advertisement

The Profit Margin Formula: Gross Margin and Net Margin Explained

Every version of the profit margin formula follows the same shape — profit divided by revenue — the only thing that changes is which costs you subtract first.

Gross Profit Margin Formula

Gross margin only accounts for COGS, which makes it the fastest way to check whether a single product is priced correctly:

$$ \text{Gross Margin} = \frac{\text{Revenue} - \text{COGS}}{\text{Revenue}} \times 100 $$

For example, if you sell an item for $50 and it costs you $30 to make, your gross profit is $20, and dividing that by $50 gives a gross margin of 40%.

Net Margin Formula and What It Reveals

Net margin subtracts every operating cost, not just COGS, so it tells you what you actually pocket rather than what a single product earns:

$$ \text{Net Margin} = \frac{\text{Revenue} - \text{Total Expenses}}{\text{Revenue}} \times 100 $$

Because net margin accounts for rent, payroll, and taxes as a decimal fraction before converting back to a percentage, it's almost always lower than gross margin for the same business.

Margin Calculator vs. Markup Calculator: Why the Numbers Differ

A margin calculator and a markup calculator ask for the same two inputs — cost and selling price — but divide them differently, which is why the two percentages never match.

Margin and Markup: Why the Formulas Differ

Margin is profit divided by selling price; markup is profit divided by purchase price (your cost). If an item has a purchase price of $30 and a sale price of $50, the margin is 40%, but the markup on that same $20 of profit is 66.7% — a gap that catches a lot of first-time sellers off guard. Understanding both margin and markup side by side keeps you from underpricing a product just because one percentage looked smaller than the other. Some sites also list this same tool as a gross margin calculator or gross profit calculator, sometimes shortened to a gp calculator or sales margin calculator — the label changes, but the math underneath is identical.

What Counts as a Good Profit Margin by Industry

There's no universal answer to what counts as a good profit margin — it depends heavily on your industry, your competition, and how much of your revenue gets eaten by fixed costs.

What Is a Good Profit Margin for Small Businesses?

As a rough benchmark, a 5% net margin is considered thin, 10% is healthy for most small businesses, and anything above 20% is strong — though software and services regularly clear far higher margins than retail because they carry almost no cost of production.

Healthy Profit Margin Benchmarks by Sector

IndustryTypical Gross MarginTypical Net Margin
Retail / e-commerce25–50%2–8%
Restaurants60–70%3–9%
Professional services40–60%10–20%
Software / SaaS70–90%15–30%

These ranges shift with the strength of your finance function too — a business that tracks profit margins closely and adjusts pricing quarterly tends to sit at the top of its sector's range, not the bottom.

Worked Examples: Using a Profit Calculator for Real Pricing Decisions

Numbers make more sense with a real product or service attached to them. Here are two examples that follow the exact same formula but land in very different places.

Example 1: Pricing a Retail Product

Say you sell a candle that costs $8 in materials and manufacturing costs, plus $1.50 in shipping to your vendors' fulfillment center. Your total cost of production is $9.50. If you sell it for $20, your profit is $10.50, and your gross margin is 52.5%. Add a 15% discount during a sale, and the same candle sold at $17 drops your margin to roughly 44% — the calculator makes that trade-off visible before you commit to the promotion.

Example 2: Pricing a Service Business

A freelance consultant with $120,000 in net sales and $40,000 in expenses — software, a portion of rent, and a modest customer acquisition cost from ads — nets $80,000 in profit, a 66.7% net margin. Because service businesses carry almost no cost of goods sold, their margins run far higher than a retailer selling physical inventory, even in the same local market value for their offering.

How to Improve Your Profit Margin Percentage

Once you know your profit margin percentage, there are really only two levers available: spend less, or bring in more per sale.

Cutting Costs Without Cutting Quality

Audit your recurring expenses, renegotiate with vendors, and look for redundant subscriptions or tools before you touch staffing. Small, steady cuts to operating costs compound the same way small price increases do.

Raising Prices Without Losing Sales

Test price increases on your highest-demand products first, lean into upselling existing customers instead of chasing new ones, and keep an eye on competition so a price change doesn't push buyers elsewhere. Even a modest bump in sales price, applied consistently, moves your profit margins more than most cost-cutting exercises ever will.

Advertisement

Other Types of Margin: Stock Trading and Currency Exchange Margin

Outside of pricing a product, the word "margin" shows up in finance in a couple of unrelated but easily confused contexts — worth knowing so you don't mix them up with your profit margin calculator results.

Stock Trading Margin and Margin Requirements

In investing, a stock trading margin is money borrowed from a broker to buy securities. The margin requirement is the minimum percentage of the purchase you must cover yourself; regulators typically set that floor around 25–50%.

Currency Exchange Margin, Leverage, and Security Deposits

A currency exchange margin works similarly: traders put down a security deposit against a much larger position, using leverage — often expressed as a margin ratio like 50:1 — to control more currency than their deposit alone would allow.

Margin TypeWhat It Measures
Profit marginProfit as a percentage of revenue
Stock trading marginBorrowed funds against a margin requirement
Currency exchange marginSecurity deposit set against an exchange rate position

None of these change how you'd calculate a =(B1-A1)/B1 style profit margin in a spreadsheet — that formula, and the income tax and net income lines it eventually feeds into, stay exactly as described above regardless of which industry your business operates in.

Getting this number right isn't just an accounting exercise — it's the foundation of any pricing strategy, whether you're running one small business or scaling toward full entrepreneurship. Track it alongside broader financial health signals like cash flow, and profitability stops being a guess and becomes something you can actually plan around.