ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Projects
  3. Build a Profit and Loss Statement in Excel

Build a Profit and Loss Statement in Excel

By ExcelReady Team·Updated November 1, 2026·6 min read

The short answer

To build a profit and loss statement in Excel, keep every transaction in one list with a Category column. On a separate sheet, SUMIF totals each category, such as =SUMIF(A:A,"Sales",C:C). Revenue minus cost of goods gives gross profit; minus operating expenses gives operating profit. Divide by revenue for margins and compare with last month.

Key takeaways

  • Record transactions once, with a category, and let SUMIF build every line of the statement.
  • Gross profit = revenue − cost of goods sold; operating profit = gross profit − operating expenses.
  • Margin = profit ÷ revenue, formatted as a percentage.
  • % change vs last month = (this month − last month) ÷ last month.
On this page+
  1. How a profit and loss statement is structured
  2. Step 1: Keep a transaction list
  3. Step 2: Total each line with SUMIF
  4. Step 3: Build the statement
  5. Step 4: Add margins
  6. Step 5: Compare with last month
  7. Step 6: Show several months side by side
  8. Where P&L skills come up at work
  9. Practise it

A profit and loss statement in Excel shows how much a business earned in a period, what it spent and what was left as profit. It's also called a P&L or an income statement. The best way to build one is to keep a single list of transactions and let SUMIF total each line. This guide builds a one-month P&L for a small shop, with margins and a comparison with last month.

How a profit and loss statement is structured#

A P&L runs from revenue at the top to profit at the bottom. Each step subtracts one kind of cost:

LineWhat it means
RevenueMoney earned from sales
Cost of goods sold (COGS)The direct cost of what you sold, such as stock
Gross profitRevenue − COGS
Operating expensesRunning costs: rent, wages, marketing, utilities
Operating profitGross profit − operating expenses

A full statement goes on to subtract interest and tax to reach net profit. For a small business or a job test, operating profit is usually enough.

Step 1: Keep a transaction list#

Record each transaction once, on its own sheet called Transactions. Every row needs a category that matches a line on the P&L.

ABC
1CategoryDescriptionAmount
2SalesStore orders8,400
3Cost of goodsStock purchase4,000
4SalesWholesale order6,250
5RentShop rent1,800
6Cost of goodsStock purchase2,720
7SalesOnline orders2,150
8WagesStaff pay4,200
9MarketingSocial ads900
10UtilitiesPower and internet380

Enter all amounts as positive numbers; the P&L formulas decide what to add and what to subtract. Use a drop-down list (Data > Data Validation > List) for the Category column, so "Sales" is never typed as "sale" or "Sales " with a space. If you already track spending, the expense tracker in Excel uses the same kind of list.

Step 2: Total each line with SUMIF#

SUMIF adds the numbers in one range where another range matches a condition. Its order is: range to check, what to match, range to add.

On a sheet called P&L, put the line names in column A and SUMIF in column B. For revenue in B4:

Excel formula
=SUMIF(Transactions!$A$2:$A$10,A4,Transactions!$C$2:$C$10)

With "Sales" in A4, the result is 16,800 (8,400 + 6,250 + 2,150). Pointing at A4 instead of typing "Sales" means you can fill the same formula down for every category. The $ signs keep the ranges fixed as you fill. The SUMIF function guide covers every argument, and you can practise SUMIF in a live sheet.

Step 3: Build the statement#

Lay out the P&L with SUMIF for each category and simple subtraction for the profit lines:

AB
4Sales16,800
5Cost of goods6,720
6Gross profit=B4-B5 → 10,080
7Rent1,800
8Wages4,200
9Marketing900
10Utilities380
11Total operating expenses=SUM(B7:B10) → 7,280
12Operating profit=B6-B11 → 2,800

Rows 4, 5 and 7 to 10 all use the same SUMIF, filled down. Bold the profit lines and add a top border so they stand out.

A useful check: every transaction should land on exactly one line. Compare =SUM(Transactions!C2:C10) with =B4+B5+SUM(B7:B10). Both give 30,800. If the transaction total is bigger, a row has a category the P&L doesn't list, often a typo like "Utilites".

Step 4: Add margins#

A margin shows profit as a share of revenue, so you can compare months or businesses of different sizes. In C6:

Excel formula
=B6/$B$4

Gross margin is 0.6, or 60% once formatted as a percentage with Ctrl+Shift+% (Mac: Control+Shift+%). Fill the formula to C12 for operating margin: 2,800 ÷ 16,800 = 16.7%. The $ keeps every row dividing by revenue in B4. The guide to the profit margin formula in Excel explains margin versus markup, which people often mix up.

Step 5: Compare with last month#

A P&L means more next to the previous period. Put last month's figures in column D and the percent change in column E. For revenue, if last month was 15,000, in E4:

Excel formula
=(B4-D4)/D4

The result is 12%: (16,800 − 15,000) ÷ 15,000. If last month's operating profit was 3,200, operating profit fell 12.5% this month, even though revenue rose. The P&L shows why: costs grew faster than sales.

Two cautions with percent change:

  • If last month is 0, the formula shows #DIV/0!. Wrap it in IFERROR: =IFERROR((B4-D4)/D4,"").
  • For costs, an increase is bad news. Some reports color cost increases red and revenue increases green to make that clear.

The percentages lesson practises percent change and percent of total step by step.

Step 6: Show several months side by side#

To show January, February and March in columns, add a Date column to the transactions and switch to SUMIFS, which takes several conditions. With dates in column D of the transactions sheet and the month's first day in row 3 of the P&L:

Excel formula
=SUMIFS(Transactions!$C:$C,Transactions!$A:$A,$A4,Transactions!$D:$D,">="&B$3,Transactions!$D:$D,"<="&EOMONTH(B$3,0))

This adds amounts for the category in A4 with dates from the first to the last day of the month in B3. The mixed references, $A4 and B$3, let one formula fill across months and down categories.

Where P&L skills come up at work#

Reading and building a P&L is common in finance, retail and sales roles. The articles on Excel skills for retail jobs and Excel skills for sales operations show where SUMIF summaries and margins appear in day-to-day work. For a stock-based business, link cost of goods to an inventory tracker.

Practise it#

Do the exercise on this page: total the month's revenue with SUMIF. Then practise SUMIF in a live spreadsheet to build every line of the statement, and practise percentages and percent change for margins and month-on-month comparisons.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

Total the revenue for the month. In F2, use SUMIF to add the Amount (C2:C8) for rows where the Category (A2:A8) is Sales.

fx
ABCDEFG
1
Category
Description
Amount
2
Sales
Store orders
8400
Revenue
3
Cost of goods
Stock purchase
4000
4
Sales
Wholesale order
6250
5
Rent
Shop rent
1800
6
Cost of goods
Stock purchase
2720
7
Sales
Online orders
2150
8
Wages
Staff pay
4200
9
10
11

Tip: SUMIF goes range to check, what to match, range to add: the Category column, "Sales", then the Amount column.

Practise this in a lesson

LessonSUMIFAdd up only the numbers that meet a condition, with and without a separate sum range.LessonPercentages and % changeCalculate percent change with (new - old) / old, format it as a percentage, and grow a number by a percent.Function guideSUMIFAdd up values that meet one condition with SUMIF. Totals by category, person or amount, the argument-order trap, and a live exercise.

Frequently asked questions

How do I make a profit and loss statement in Excel?

+

List your transactions with a category for each, then use SUMIF to total each category on a summary sheet. Subtract cost of goods sold from revenue for gross profit, then subtract operating expenses for operating profit.

What is the difference between gross profit and net profit?

+

Gross profit is revenue minus the direct cost of what you sold. Net profit goes further and also subtracts operating expenses, interest and tax. A simple statement often stops at operating profit.

How do I calculate profit margin in Excel?

+

Divide the profit by revenue and format the result as a percentage: =B10/B4. A gross profit of 10,080 on revenue of 16,800 is a 60% gross margin.

How do I show a P&L by month in Excel?

+

Add a Date column to your transactions and use SUMIFS with a category and a date range, for example dates from the first to the last day of the month. Put one month in each column.

Sources

  • SUMIF function - Microsoft Support
  • SUMIFS function - Microsoft Support
  • Calculate percentages - Microsoft Support

Written and checked by the ExcelReady Team. First published November 1, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. How a profit and loss statement is structured
  2. Step 1: Keep a transaction list
  3. Step 2: Total each line with SUMIF
  4. Step 3: Build the statement
  5. Step 4: Add margins
  6. Step 5: Compare with last month
  7. Step 6: Show several months side by side
  8. Where P&L skills come up at work
  9. Practise it

Keep reading

Tests & careers· 6 min read

Excel Skills for Sales and Operations Roles

The key Excel skills for sales and operations roles are totalling revenue by region, rep or product with SUMIF and SUMIFS, calculating percent change and % of total, finding the top order and its rep with MAX and XLOOKUP, totalling by month with date criteria, and flagging stock or targets with IF. Answers should update when data changes.

Tests & careers· 6 min read

Excel for Retail Jobs: Sales, Stock and Margins

The Excel skills used most in retail are totalling sales by category or store with SUMIF, comparing this week with last week using percent change, working out margin and markup from price and cost, and flagging low stock with conditional formatting. Add COUNTIF for counting items below a reorder level and you can handle most store reports.

Projects· 5 min read

Track Expenses by Category in Excel

To make an expense tracker in Excel, log one expense per row with its date, description, category and amount. Then total each category with SUMIF, for example =SUMIF(C:C,"Travel",E:E), and add a month condition with SUMIFS. A pivot table gives the same category and month totals in a few clicks, and both update when you add expenses.

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free