Profit margin calculator: gross margin, net margin and markup
Reviewed Sep 28, 2026 Internal Revenue Service Statistics of Income, tax year 2023 (sole proprietorships) How we verify
Not a substitute for the advice of an attorney. General information; laws vary by state. Terms of use
This profit margin calculator works out gross margin = (revenue - cost of goods sold) / revenue, net margin = net profit / revenue and markup = (price - cost) / cost, and compares your result with the IRS figure for your industry. In tax year 2023, nonfarm sole proprietorships had a gross margin of 72.9% (business receipts minus cost of sales and operations) and net income less deficit of 18.3% of business receipts (IRS Statistics of Income, computed by InterObservers, retrieved Sep 28, 2026). So a restaurant with $50,000 of sales and $18,000 of food and drink costs has a 64.0% gross margin, above the 62.5% IRS figure for restaurants and drinking places filed as sole proprietorships.
Profit margin calculator
Example: $10,000 revenue, $6,000 cost of goods sold
40.0% gross margin
- Gross profit: $4,000 on $10,000 of revenue
- Markup on cost: 66.7%
Compared with the IRS figure for all nonfarm industries
Below the IRS figure for all nonfarm industries: a 72.9% gross margin (business receipts minus cost of sales and operations, as a share of business receipts; nonfarm sole proprietorships, tax year 2023), a gap of 32.9 percentage points. The IRS figure is an industry total computed by InterObservers, not a typical business and not a target. Source: IRS Statistics of Income.
IRS figure from IRS Statistics of Income, tax year 2023, retrieved Sep 28, 2026. Enter your numbers above and choose your industry: your result replaces this example.
What you type stays in this browser. We never receive or store it.
What to do next
If the margin is thinner than you planned, check the price, the cost of what you sell and the sales you need to cover your fixed costs.
- Break-even point calculatorThe sales that cover your fixed costs at this margin
- Hiring your first employee: the steps and your state’s rulesBefore a new salary comes out of your margin
- Offer letter templatePut the pay your margin allows in writing
Profit margin formulas
- Gross profit = revenue - cost of goods sold
- Gross margin = gross profit / revenue
- Net margin = net profit / revenue, where net profit is revenue minus every expense
- Markup = (price - cost) / cost
- Margin from markup = markup / (1 + markup); markup from margin = margin / (1 - margin)
- Price for a target margin = cost / (1 - target margin)
Use revenue and costs from the same period and net of discounts and returns. If revenue is zero there is no margin, and if the cost is zero there is no markup: the calculator says so instead of giving a number. A cost higher than the revenue gives a negative margin, which the calculator shows as it is.
Worked examples
Each example is computed with the same code as the calculator.
A small online store. Revenue is $10,000 and cost of goods sold is $6,000. Gross profit is $4,000, so the gross margin is $4,000 / $10,000 = 40.0%. The markup is $4,000 / $6,000 = 66.7%: the same sale, two different percentages.
A higher-cost supplier deal. Revenue is $50,000 and cost of goods sold is $42,500. Gross profit is $7,500: a 15.0% gross margin and a 17.6% markup. Little is left for rent, pay and marketing.
A software product. Revenue is $20,000 and the direct costs (hosting and support) are $4,000. Gross profit is $16,000: an 80.0% gross margin and a 400.0% markup.
Net margin, and a loss. A business with $250,000 of revenue and $30,000 left after every expense has a net margin of $30,000 / $250,000 = 12.0%. With $80,000 of revenue and $86,000 of expenses, the result is a loss of $6,000 and a net margin of -7.5%: the calculator shows a negative margin as it is.
Markup and the price for a target margin. An item costs $30.00 and sells for $50.00: markup $20.00 / $30.00 = 66.7%, margin $20.00 / $50.00 = 40.0%. For a 40.0% margin on the same cost, the price is $30.00 / (1 - 40.0%) = $50.00, a 66.7% markup; for 50.0% it is $60.00.
Gross and net margins by industry (IRS, tax year 2023)
The 20 detailed industries with the largest business receipts among nonfarm sole proprietorships in tax year 2023 (IRS Statistics of Income) that have every figure and no IRS caution flag, after all nonfarm industries. The calculator offers 150 industries and sectors.
| Industry | Gross margin | Net margin, all returns | Net margin, returns with net income |
|---|---|---|---|
| All nonfarm industries | 72.9% | 18.3% | 31.4% |
| Specialty trade contractors | 68.8% | 15.7% | 21.2% |
| Administrative and support services | 84.3% | 21.2% | 37.8% |
| Truck transportation | 90.7% | 10.1% | 18.0% |
| Construction of buildings | 55.0% | 13.2% | 18.7% |
| Personal and laundry services | 90.2% | 24.4% | 42.7% |
| Restaurants (full & limited service) and drinking places | 62.5% | 3.4% | 13.6% |
| Management, scientific, and technical consulting services | 93.7% | 50.2% | 63.7% |
| Other financial investment activities (investment advice) | 49.3% | 15.2% | 42.6% |
| Offices of real estate agents, brokers, property managers, and appraisers | 91.0% | 35.0% | 48.6% |
| Other miscellaneous services | 84.2% | 33.0% | 45.7% |
| Performing arts, spectator sports, and related industries | 90.8% | 26.5% | 46.8% |
| Motor vehicle and parts dealers | 25.9% | 3.6% | 8.5% |
| Taxi, limousine service, and ridesharing service | 99.1% | 6.3% | 26.1% |
| Legal services | 91.2% | 43.8% | 49.5% |
| Miscellaneous store retailers | 53.4% | 7.5% | 23.9% |
| Food and beverage stores | 40.1% | 4.3% | 10.6% |
| Durable goods, including machinery, woods, metals, etc. | 39.0% | 7.5% | 14.2% |
| Insurance agencies and brokerages | 97.5% | 36.1% | 46.1% |
| Nondurable goods, including food, fiber, chemicals, etc. | 32.4% | 6.6% | 12.9% |
| Other activities related to real estate | 61.9% | 14.9% | 33.3% |
Source: IRS, Statistics of Income Division, Sole Proprietorship Returns 2023, March 2026 (Tables 1 and 2, tax year 2023), retrieved Sep 28, 2026. Computed by InterObservers from the IRS totals: gross margin = (business receipts - cost of sales and operations) / business receipts; net margin = net income less deficit / business receipts (all returns); with net income = net income / business receipts of the returns with a net income. Industry totals, not a typical business.
What the IRS figures mean
- Who is counted. Nonfarm sole proprietorships: individual owners who file Schedule C, tax year 2023 (IRS, Statistics of Income Division, Sole Proprietorship Returns 2023, March 2026). Partnerships and corporations are not in these figures.
- A share of business receipts. Gross margin is business receipts minus the IRS line “cost of sales and operations”; net margin is “net income less deficit”, so the businesses that lost money pull it down. Both are divided by business receipts.
- Cost of sales depends on how costs are reported. Many service businesses list most of their costs as other expenses (wages, rent, car and truck expenses), not as cost of sales, so their gross margin in these tables comes close to 100%. For those industries the net margin is the better comparison.
- Industry totals, not a typical business. Each figure is an industry total divided by an industry total, computed by InterObservers. Large businesses weigh more than small ones, and a business of your size can differ a lot.
- Owner pay is inside net income. The IRS: “Salaries paid to owners are neither deducted as wages paid on Schedule C nor included as wages received on Form 1040, U.S. Individual Income Tax Return.” (IRS SOI Bulletin). So a sole proprietor's net margin includes what the owner lives on; compare it with your net profit before paying yourself.
- Estimates from a sample. The IRS: “Since the data presented in this article are estimates based on a sample of returns filed, they are subject to sampling error.” (IRS SOI Bulletin). Figures the IRS marks for caution, or combined to protect taxpayer data, carry that note in the calculator.
- A benchmark is context, not a verdict. Above or below the IRS figure tells you where you sit against the industry total, not whether your prices are right.
How to raise your margin
- Reprice deliberately. Test small increases on the products customers are least sensitive to and watch how many sales you keep.
- Cut the cost of goods at the source. Renegotiate supplier terms, consolidate orders or reduce freight: every dollar off the cost widens the margin without touching the price.
- Shift the mix. Promote the products with the highest margin and review the ones that pull the average down.
- Keep inventory lean. Overstock ties up cash and ends in markdowns.
- Check discounts. Promo codes and free shipping lower the revenue of each sale; count them before you work out the margin.
How the calculator works
- The math. Gross margin, net margin and markup with the formulas above, shown to one decimal. A cost above the revenue or the price gives a negative margin, shown as such. The target price uses the cost you entered.
- The comparison. The industry you choose is compared in the same unit: gross margin with the IRS gross margin, net margin with net income less deficit, markup with the markup implied by the IRS figures (business receipts minus cost of sales and operations, divided by cost of sales and operations). Results that round to the same one-decimal percentage are shown as the same.
- Which industries. 150 industries and sectors of the IRS tables with a gross or net figure. 2 IRS rows have no figure to compare with (not disclosed, or no receipts) and are not listed. S corporation and partnership figures are on the profit margin by industry page: they cover other businesses and other tax years, so they are not mixed in here.
- The data file. Every industry with its figures and flags: industries.json.
- What it leaves out. Taxes on profit, the timing of payments, several products with different margins (enter totals for the period) and anything that is not in your numbers.
The figures on this page are general information, not financial or tax advice. See how we check the data.
Questions people ask
What is the difference between margin and markup?
Both start from gross profit (price minus cost). Margin divides it by the price or revenue, so it is always below 100%; markup divides it by the cost and can be higher than 100%. A 40.0% margin is a 66.7% markup on the same numbers. To convert: markup = margin / (1 - margin), and margin = markup / (1 + markup).
How do you calculate gross profit margin?
Subtract cost of goods sold from revenue to get gross profit, then divide by revenue: ($10,000 - $6,000) / $10,000 = 40.0%. Use revenue and costs from the same period.
What is the difference between gross margin and net margin?
Gross margin counts only the direct cost of what you sold (cost of goods sold). Net margin subtracts every expense, including rent, salaries, marketing, interest and taxes, so it is lower than gross margin for almost every business.
What counts as cost of goods sold?
The direct costs of producing or buying what you sold: goods bought for resale, materials, freight in and the labor that makes the product. Rent of the office, advertising and administrative salaries are operating expenses: they lower net margin, not gross margin.
What is a good profit margin?
It depends on the industry. In the IRS tax data for tax year 2023, nonfarm sole proprietorships had a gross margin of 72.9% and net income less deficit of 18.3% of business receipts, and the figures differ a lot from one industry to another: profit margin by industry. A sole proprietor's net income includes the owner's own pay, so compare your net margin before paying yourself.
How do I find the price for a target margin?
Divide the cost by 1 minus the target margin: price = cost / (1 - margin). An item that costs $30.00 needs a price of $50.00 for a 40.0% margin (a 66.7% markup). The calculator does this in the gross margin and markup modes.
Sources (4)
Checked Sep 28, 2026 · How we verify every rule · Report an error
General information, not legal advice. Not a substitute for the advice of an attorney. This page is for general information only and isn’t legal, financial or tax advice. Laws vary by state and change; check the official source or talk to a qualified professional about your situation. Report an error