How to Make a Profit and Loss Statement in Excel (Free Template)
Listen to this article
A profit and loss statement in Excel lists revenue, subtracts cost of goods sold to get gross profit, subtracts operating expenses to get operating profit, then adds other income, subtracts interest and other expenses, and subtracts taxes to reach net profit. Each margin is that profit figure divided by revenue. This guide builds a 12-month P&L with a year-to-date column, a month drop-down dashboard, a prior-year comparison, margin rows, a chart, a downloadable workbook, and the exact formulas to copy.
A P&L is the same statement as an income statement. MagnÜron’s guide to how to read a profit and loss walks through the idea with a print-shop example; this article is the Excel build, using a fictional neighborhood bakery. The margin rows use the same math as the gross profit margin guide, and net profit vs. gross profit explains the gap between those two lines. Pair the finished statement with a small business budget in Excel, a cash flow forecast, and a break-even analysis. A P&L is not a cash flow statement — cash flow vs. profit covers the difference. Related tools live in the Money hub, the business calculators, and the dynamic Excel dashboard guide.

What You Will Build
The sample is a fictional neighborhood bakery, with monthly figures for 2027 and a matching prior-year sheet for 2026. All numbers in this article come from that sample. They are for practice only, not financial or tax advice.
On Full year, the dashboard shows:
- Total revenue: $128,100, up $14,900 from $113,200 in 2026
- Cost of goods sold: $37,260, and gross profit $90,840 (gross margin 70.9%, versus 69.6% last year)
- Operating expenses: $79,340, and operating profit $11,500 (operating margin 9.0%, versus 4.8%)
- Other income: $400 (a June equipment rebate). Interest: $1,080. Income before tax: $10,820
- Taxes (typed in the sample as a rounded estimate): $2,810
- Net profit: $8,010, up $5,210 from $2,800 (net margin 6.3%, versus 2.5%)
The year is not evenly profitable. January through March still lose money — March net profit is ($500), better than last year’s ($710), but year-to-date net is still ($2,760). By June, year-to-date net profit turns to $50. August dips to a ($420) loss after a $1,100 oven repair. Holiday sales then lift December net profit to $3,100.
The download already includes the monthly P&L, the Year column, the prior-year sheet, the Period drop-down on the dashboard (cell C3), year-to-date figures, margin rows, the comparison table, and a column chart of monthly net profit. It has no macros and does not use XLOOKUP, so it calculates in current Excel and in the LibreOffice test used to check the file.

Step 1. Set Up the Monthly Grid
Give the worksheet a line-item column, a category column, one column for each month, and a Year column. In the sample, January through December sit in columns C through N, and Year is column O. Put the month names in row 4, exactly as they will appear in the drop-down: January, February, March, and so on.
Type amounts only on the yellow detail rows: the two revenue lines, the two cost-of-goods-sold lines, the six operating-expense lines, other income, interest, and taxes. Every total, profit, and margin row is a formula. For each detail line, the Year cell is a sum of the twelve months. For retail bakery sales in row 5:
=SUM(C5:N5)
Copy that pattern down the detail rows. Do not include the Year column inside the sum — the range stops at December (N).
Keep line names identical on the prior-year sheet so later comparisons still match. If you add a row later, add it in the same place on both sheets.
Step 2. Calculate Revenue, COGS, and Gross Profit
Total revenue adds the revenue detail lines. Total cost of goods sold adds the COGS lines. Gross profit is total revenue minus total COGS, and gross margin is gross profit divided by total revenue. In January (column C), with retail sales in C5, wholesale and catering in C6, ingredients in C8, and packaging in C9:
=C5+C6
=C8+C9
=C7-C10
=IF(C7=0,"",C11/C7)
The IF guard leaves the margin blank if revenue is zero, so you do not divide by zero in a quiet start-up month. Format the first three results as currency and the margin as a percentage with one decimal place. Copy the four formulas across January through December and into the Year column, so each period uses its own cells (January is C7−C10; the year is O7−O10).
In January the bakery has $8,000 of revenue and $2,380 of COGS, so gross profit is $5,620 and gross margin is 70.3%. For the full year, revenue is $128,100, COGS is $37,260, gross profit is $90,840, and gross margin is 70.9%.
Step 3. Subtract Operating Expenses to Get Operating Profit
Operating expenses are the costs of running the business that are not tied directly to each item sold — payroll, rent, utilities, marketing, supplies and repairs, and a small other-operating line in the sample. Operating expenses covers the idea in more detail. Total them, then subtract that total from gross profit:
=C13+C14+C15+C16+C17+C18
=C11-C19
=IF(C7=0,"",C20/C7)
January operating expenses are $6,430, so operating profit is $5,620 − $6,430 = ($810), and the operating margin is −10.1%. The bakery does not reach a positive operating profit until April. For the full year, operating expenses are $79,340 and operating profit is $11,500, an operating margin of 9.0%.
Watch one-off costs. In August, supplies and repairs jump to $1,100 for an oven repair, and operating profit falls to ($330) even though revenue is still $9,900.
Step 4. Add Other Income, Interest, Taxes, and Net Profit
Below operating profit, add other income (a rebate, a one-time sale of equipment, interest earned) and subtract interest and other non-operating expenses. The result is income before tax. Then subtract taxes to reach net profit, and divide net profit by revenue for the net margin:
=C20+C22-C23
=C24-C25
=IF(C7=0,"",C26/C7)
In the sample, other income is zero in every month except June, when a $400 rebate appears. Interest is $90 each month, or $1,080 for the year. Taxes are typed, not calculated — the sample uses a rounded estimate of about 20% of positive income before tax, and zero in loss months. That is a placeholder for practice, not a tax computation. January adds the $90 interest cost to the operating loss, so net profit is ($900) and net margin is −11.3%. In June, $1,670 of operating profit plus $400 of other income minus $90 of interest leaves $1,980 before tax; after $400 of tax, net profit is $1,580 (net margin 13.9%). For the full year, income before tax is $10,820, tax is $2,810, net profit is $8,010, and net margin is 6.3%.
Step 5. Add a Year-to-Date Column and a Month Drop-Down
A Year total is useful, but you also want one month and the year so far without rebuilding the grid. Put a Period drop-down in Dashboard cell C3, listing Full year and the twelve month names, spelled the same way as the headers in row 4. C3 is the only input on the dashboard. The KPI cards, the alert, and the comparison table all follow that cell. The chart always shows all twelve months.
To pull the selected month from the P&L, use INDEX and MATCH, and switch to the Year column when C3 is Full year. For total revenue, if the chosen period is in Calc!B2 (which simply reads Dashboard!C3) and the Year total is in ProfitLoss!O7:
=IF($B$2="Full year",ProfitLoss!O7,INDEX(ProfitLoss!C7:N7,1,MATCH($B$2,ProfitLoss!$C$4:$N$4,0)))
Year-to-date is a SUMPRODUCT over the months whose index is less than or equal to the selected month (use 12 when the drop-down is Full year). If Calc!C4:N4 holds 1 through 12 and Calc!B3 holds that month index:
=SUMPRODUCT(($C$4:$N$4<=$B$3)*(ProfitLoss!C7:N7))
INDEX and MATCH avoid XLOOKUP, which some spreadsheets still do not calculate the same way. Repeat the pair of formulas for each P&L line you want on the dashboard.
Year-to-date margins must use year-to-date dollars, not an average of monthly percents. If year-to-date gross profit is in C17 and year-to-date revenue is in C13:
=IF(C13=0,"",C17/C13)
In March, the month’s gross margin is 70.9%, but year-to-date gross margin is 70.2% — $17,140 of gross profit on $24,400 of revenue. Averaging January’s 70.3%, February’s 69.5%, and March’s 70.9% would be the wrong figure, because the months are not the same size.
Step 6. Compare with the Prior Period
Copy the same layout onto a PriorYear sheet and fill in 2026. Keep every line name and row in the same place. The dashboard then compares the selected month with the same month last year, and year-to-date with the same stretch last year. Variance in dollars is this year minus last year. Variance as a percent divides that difference by the absolute value of the prior figure, so a smaller loss still shows as a positive variance.
In March 2027, revenue is $9,000 versus $8,100, and net profit is ($500) versus ($710) — a $210 improvement, even though the month is still a loss. Year-to-date through March, net profit is ($2,760) versus ($3,700). In June, the month’s net profit is $1,580 versus $760, and year-to-date net profit is $50 versus a ($2,280) loss at the same point last year. For the full year, net profit rises $5,210, or 186.1%, on a 13.2% increase in revenue and a wider operating margin.
A repair, a holiday lift, or a slow first quarter then shows up in the month it belongs, next to the same month a year ago.
Step 7. Chart Monthly Net Profit and Keep the Margin Rows Visible
Add a clustered column chart of monthly net profit for 2027 and 2026. Leave the chart on the full year even when the drop-down is set to one month, so you can see the shape of the year while you inspect a period. In the sample, the first three months sit below the axis in both years, April turns positive, August 2027 dips after the oven repair, and November and December stand well above the prior year.
Keep the three margin rows on the P&L itself — gross, operating, and net — not only on the dashboard. Gross margin holds near 71% in the sample, while operating margin climbs from a first-quarter loss to 25.4% in December. Conditional formatting on the net profit row, red below zero and green above, makes the same pattern obvious in the grid.
Step 8. Check, Share, and Use the Result
Before you trust a new month, confirm three things. First, every total, profit, and margin cell is still a formula — a typed number in those rows will hide a later typo. Second, year-to-date margins still divide year-to-date profit by year-to-date revenue. Third, the drop-down month names match the headers in row 4 exactly; a label such as Mar will not match March, and the dashboard will show an error instead of the month.
The workbook has no macros and does not use XLOOKUP, so you can share the .xlsx file without enabling content or relying on a newer lookup function. Use the P&L next to the budget and the cash flow forecast: the budget asks what you planned, the P&L asks whether the period was profitable, and the cash forecast asks whether you can pay the bills.
Worked Example: Formulas and Expected Totals
Here is the January column of the sample, with the formulas in column C and the results they should return. Revenue and cost lines are typed inputs.
- Total revenue,
=C5+C6: $7,200 + $800 = $8,000 - Total COGS,
=C8+C9: $2,100 + $280 = $2,380 - Gross profit,
=C7-C10: $8,000 − $2,380 = $5,620 - Gross margin,
=IF(C7=0,"",C11/C7): $5,620 / $8,000 = 70.3% - Total operating expenses,
=C13+C14+C15+C16+C17+C18: $3,600 + $1,600 + $380 + $400 + $200 + $250 = $6,430 - Operating profit,
=C11-C19: $5,620 − $6,430 = ($810) - Operating margin,
=IF(C7=0,"",C20/C7): ($810) / $8,000 = −10.1% - Income before tax,
=C20+C22-C23: ($810) + $0 − $90 = ($900) - Net profit,
=C24-C25: ($900) − $0 = ($900) - Net margin,
=IF(C7=0,"",C26/C7): ($900) / $8,000 = −11.3%
The same formulas in the Year column (O) should return $128,100 of revenue, $37,260 of COGS, $90,840 of gross profit (70.9%), $79,340 of operating expenses, $11,500 of operating profit (9.0%), $10,820 of income before tax, $2,810 of tax, and $8,010 of net profit (6.3%). If you set the dashboard to March, revenue should be $9,000, net profit ($500), and year-to-date net profit ($2,760). If you set it to June, the month’s net profit should be $1,580 and year-to-date net profit should be $50.
Key Takeaways
- Build the P&L as a monthly grid with a Year sum, and type amounts only on the detail rows.
- Gross profit is revenue minus COGS; operating profit subtracts operating expenses; net profit then reflects other income, interest, and taxes.
- Each margin is that profit divided by revenue. Year-to-date margins must use year-to-date dollars, not an average of monthly percents.
- A Period drop-down, INDEX/MATCH, and SUMPRODUCT give you one month, the year so far, and a prior-year comparison without rebuilding the sheet.
- Read the P&L beside a budget and a cash flow forecast. A profitable month can still be tight on cash, and a loss month can still leave cash in the bank.
MagnÜron shop
Want the complete set? The MagnÜron Small Business Finance Toolkit is $29 in the MagnÜron shop. It includes this P&L plus the budget, cash flow, break-even and dashboard workbooks, and an 8-page guide.
Frequently Asked Questions
What is a profit and loss statement in Excel?
A profit and loss statement, also called an income statement, lists revenue and then subtracts costs and expenses to show profit for a period. In Excel you typically build a monthly grid with formulas for totals, gross profit, operating profit, net profit, and margins, plus a year-to-date column and, if you want, a comparison with last year.
How do you calculate gross profit and gross margin in Excel?
Gross profit is total revenue minus total cost of goods sold. Gross margin is gross profit divided by total revenue. In the January column of the sample, =C7-C10 returns $5,620, and =IF(C7=0,"",C11/C7) returns 70.3%. For the full year, gross profit is $90,840 and gross margin is 70.9%.
What is the difference between operating profit and net profit?
Operating profit is gross profit minus operating expenses. Net profit starts from operating profit, adds other income, subtracts interest and other non-operating expenses, and subtracts taxes. In the sample, full-year operating profit is $11,500 and net profit is $8,010 after $400 of other income, $1,080 of interest, and $2,810 of tax.
How do I show one month, year-to-date, and a comparison with last year?
Use a Period drop-down and pull the selected month with INDEX and MATCH, or the Year total when the drop-down is set to Full year. Sum January through the selected month with SUMPRODUCT for year-to-date, and build the same layout for the prior year so you can subtract. In the sample, March net profit is ($500) versus ($710) last year, and year-to-date net profit through March is ($2,760).
Is a profit and loss statement the same as a cash flow statement?
No. A P&L shows whether the period was profitable; a cash flow statement shows cash in and cash out. A month can be profitable and still tight on cash, or unprofitable and still leave cash in the bank. Use the P&L with a cash flow forecast, and see the cash flow versus profit guide for the distinction.
