# Net Profit Margin Formula: Calculate It in Excel (Example)

- URL: https://betteranalyst.com/metrics/net-profit-margin
- Published: 2026-10-29
- Updated: 2026-10-29
- Author: David Bressler, Founder (https://betteranalyst.com/authors/david-bressler)

> **Summary:** Net profit margin = Net income ÷ Revenue × 100. It shows how much of each sales dollar is left after every cost, including overhead, interest and tax. A marketing agency with $2.48M revenue and $314,000 of net income has a 12.7% net profit margin.

Category: [Finance](https://betteranalyst.com/metrics#finance)

Net profit margin formula with an agency P&L example, the Excel formula, and why pass-through revenue makes agency margins look smaller than they are.

## Net profit margin formula

```
Net profit margin % = Net income ÷ Revenue × 100, where Net income = Revenue − all expenses (COGS, operating expenses, interest, taxes)
```

- **Revenue**: Total net sales for the period after returns and discounts.
- **Net income**: Profit after every expense: cost of services, operating expenses, interest and income tax.

## How to calculate net profit margin in Excel and Google Sheets

Excel, using the cells in the worked example below:

```
=(B2-SUM(B3:B6))/B2
```

## Worked example

A 20-person marketing agency is reviewing its 2025 results. Cost of services is freelancers and production; operating expenses cover salaries, rent and software.

*Agency P&L summary, 2025 (table starts in cell A1)*

| Line | Amount |
| --- | --- |
| Revenue | $2,480,000 |
| Cost of services | $1,190,000 |
| Operating expenses | $862,000 |
| Interest | $18,000 |
| Income tax | $96,000 |

1. Total expenses = 1,190,000 + 862,000 + 18,000 + 96,000 = $2,166,000.
2. Net income = 2,480,000 − 2,166,000 = $314,000.
3. Net profit margin = 314,000 ÷ 2,480,000 = 12.7%.
4. For comparison, gross margin is (2,480,000 − 1,190,000) ÷ 2,480,000 = 52.0%, so overhead, interest and tax consume about 39 points.

**Result:** 12.7% net profit margin ($314,000 net income)

## How to interpret net profit margin

Net margin is the most complete profitability ratio, which also makes it the noisiest: one-off tax credits, write-offs or a refinancing can swing it. Typical levels vary by model, from low single digits in grocery and distribution to well above 20% in some software and asset-light services businesses. Agencies should also look at margin on net revenue (revenue minus media and other pass-through costs), because billing media through the agency inflates revenue without adding profit. Trend it quarterly and look at gross and operating margin next to it to see which layer moved.

## Common mistakes

- Using revenue that includes pass-through media spend. A client's $500,000 ad budget billed through the agency can halve the reported margin without changing profit.
- Comparing pre-tax margin with someone else's after-tax margin. Say which one you report.
- Letting one-off items drive conclusions. Strip out asset sales or legal settlements to see underlying margin.
- Calculating margin on cash received rather than revenue earned in the period, which mixes timing with profitability.

## Calculate net profit margin with Better Analyst

Connect your data or upload a spreadsheet, then ask in plain English. Better Analyst writes and runs the calculation and shows the steps, so you can check the number.

- “Calculate net profit margin by client for 2025, excluding pass-through media costs from revenue.”
- “Show gross, operating and net margin by quarter on one chart.”
- “Which expense categories grew faster than revenue this year?”

Usually calculated from: [Google Sheets](https://betteranalyst.com/data-connectors/google-sheets), [OneDrive](https://betteranalyst.com/data-connectors/onedrive), [SharePoint](https://betteranalyst.com/data-connectors/sharepoint), [Microsoft SQL Server](https://betteranalyst.com/data-connectors/mssql), [PostgreSQL](https://betteranalyst.com/data-connectors/postgresql), [Snowflake](https://betteranalyst.com/data-connectors/snowflake).

[Try Better Analyst free](https://betteranalyst.com/signup)

## Further reading

- [Gross margin formula](https://betteranalyst.com/metrics/gross-margin)
- [How to calculate EBITDA](https://betteranalyst.com/metrics/ebitda)
- [Profit and loss template](https://betteranalyst.com/excel-templates/profit-and-loss-template)
- [Better Analyst for agencies](https://betteranalyst.com/solutions/agencies)
- [Calculate percentages in Excel](https://betteranalyst.com/excel/how-to-calculate-percentage-in-excel)

## Frequently asked questions

### What is the difference between gross and net profit margin?

Gross margin subtracts only the direct cost of what you sold; net margin subtracts everything, including overhead, interest and tax. In the agency example gross margin is 52.0% and net margin is 12.7%.

### How do I calculate net profit margin in Excel?

If net income is in B7 and revenue in B2, use =B7/B2 and format as a percentage. If you only have the expense lines, =(B2-SUM(B3:B6))/B2 calculates net income and the margin in one step.

### Can net profit margin be higher than gross margin?

Only in unusual cases, such as a large one-off gain below the operating line (an asset sale or tax credit). Normally net margin is lower because it subtracts more costs.

## Related metrics

- [Gross Margin Formula: How to Calculate Gross Margin in Excel](https://betteranalyst.com/metrics/gross-margin)
- [How to Calculate EBITDA: Formula, Example and EBITDA Margin](https://betteranalyst.com/metrics/ebitda)
