How to Compare Sales Year over Year in Google Sheets
Each month this year next to the same month last year, with the percent change and a fair year-to-date total.
The short answer: for the month in A2, this year is =SUMIFS(Orders!$J:$J, Orders!$A:$A, ">="&$A2, Orders!$A:$A, "<"&EDATE($A2,1)) and last year is the same formula shifted with EDATE($A2,-12). In the sample data, January to October 2026 is $1,296,259 against $1,116,762 for the same months of 2025, up 16.1%.
The sample data
| A | B | C | D | E | F | G | H | I | J | K | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Date | Order ID | Customer | Region | Channel | Product | Category | Qty | Unit price | Revenue | Cost |
| 2 | 2025-01-01 | SO-10001 | Tin Roof Café | Northeast | Sales rep | Sip Lids (case of 1,000) | Supplies | 6 | 54 | 324 | 198 |
| 3 | 2025-01-01 | SO-10001 | Tin Roof Café | Northeast | Sales rep | Espresso Roast 5 lb | Coffee | 10 | 68 | 680 | 370 |
| 4 | 2025-01-01 | SO-10002 | Foxglove Café | Northeast | Online store | Sip Lids (case of 1,000) | Supplies | 1 | 54 | 54 | 33 |
| 5 | 2025-01-01 | SO-10002 | Foxglove Café | Northeast | Online store | Cold Brew Concentrate 1 gal | Coffee | 8 | 42 | 336 | 152 |
| 6 | 2025-01-01 | SO-10003 | Ember Café | Midwest | Online store | Sip Lids (case of 1,000) | Supplies | 4 | 54 | 216 | 132 |
| … | 8,115 more rows | ||||||||||
Sample data: a tab named Orders with 8,120 order lines from January 2025 to October 2026, one row per order line. Revenue is Qty × Unit price; Cost is the line's cost of goods (Qty × unit cost). Download orders.csv and import it (File → Import) to follow along. The business is fictional.
The classic way: SUMIFS twice, a year apart
Headings in row 1: Month, 2025, 2026, Change. In A2 put =DATE(2026,1,1), in A3 =EDATE(A2,1), copied down to A11 (October). Format column A as "MMM" so it shows Jan, Feb and so on.
Last year's month in B2, copied down. EDATE($A2,-12) is the same month one year earlier:
=SUMIFS(Orders!$J:$J, Orders!$A:$A, ">="&EDATE($A2,-12), Orders!$A:$A, "<"&EDATE($A2,-11))
This year's month in C2, and the change in D2, both copied down:
=SUMIFS(Orders!$J:$J, Orders!$A:$A, ">="&$A2, Orders!$A:$A, "<"&EDATE($A2,1))
=IFERROR(C2/B2-1, "")
The bottom row (Jan-Oct) is =SUM(B2:B11), =SUM(C2:C11) and =C12/B12-1. Note the last one divides the totals; it does not average the monthly percents.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Month | 2025 | 2026 | Change |
| 2 | Jan | $114,370 | $122,587 | 7.2% |
| 3 | Feb | $89,015 | $103,390 | 16.1% |
| 4 | Mar | $91,596 | $130,195 | 42.1% |
| 5 | Apr | $123,970 | $128,136 | 3.4% |
| 6 | May | $113,465 | $125,646 | 10.7% |
| 7 | Jun | $102,323 | $136,411 | 33.3% |
| 8 | Jul | $110,643 | $127,769 | 15.5% |
| 9 | Aug | $120,222 | $141,015 | 17.3% |
| 10 | Sep | $130,929 | $138,635 | 5.9% |
| 11 | Oct | $120,229 | $142,475 | 18.5% |
| 12 | Jan-Oct | $1,116,762 | $1,296,259 | 16.1% |
Computed from the sample CSV above. Cells formatted as currency and percent.
Pivot table version: put Date in Rows and again in Columns. Right-click a date in the rows, choose Create pivot date group → Month; in the columns choose Year. Values: SUM of Revenue. You get one column per year; add the change column beside it.
Gotchas
- Year to date vs a full year. Ten months of 2026 against twelve months of 2025 makes this year look down. Compare the same months on both sides, as the Jan-Oct row does.
- Averaging the monthly percents. The average of the ten monthly changes is not the year-to-date change. Divide the totals instead.
- Missing history. If last year's data starts mid-year, the early months show 0 and the change is
#DIV/0!.IFERRORblanks it, but the total row is then not like for like. - Calendar shifts. October 2026 has a different number of weekends than October 2025. For businesses that live on weekends, compare by week or by selling day.
The one-cell way: =QUIRIZ
With the Quiriz add-on for Google Sheets, you type the question instead of building the formula. =QUIRIZ does not read the cells around it: it answers from the datasets in your Quiriz account. For this example, upload orders.csv as a dataset, or connect your Shopify store. You can also add a Google Sheet itself as a dataset that refreshes on a schedule. Then, in any empty cell:
=QUIRIZ("revenue by month for January to October, 2025 vs 2026, with the percent change and a Jan-Oct total row", "table")
The "table" mode spills the answer down and to the right from that cell, header row first:
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Month | 2025 | 2026 | Change |
| 2 | Jan | $114,370 | $122,587 | 7.2% |
| 3 | Feb | $89,015 | $103,390 | 16.1% |
| 4 | Mar | $91,596 | $130,195 | 42.1% |
| 5 | Apr | $123,970 | $128,136 | 3.4% |
| 6 | May | $113,465 | $125,646 | 10.7% |
| 7 | Jun | $102,323 | $136,411 | 33.3% |
| 8 | Jul | $110,643 | $127,769 | 15.5% |
| 9 | Aug | $120,222 | $141,015 | 17.3% |
| 10 | Sep | $130,929 | $138,635 | 5.9% |
| 11 | Oct | $120,229 | $142,475 | 18.5% |
| 12 | Jan-Oct | $1,116,762 | $1,296,259 | 16.1% |
Same figures as the formula result above, from the same sample data. The spilled cells are plain numbers, so you can format them, total them or chart them; here they are formatted as currency and percent. Column headings are written with each answer and may be worded differently.
The other modes: "verbose" (the default) answers in a sentence, "bullets" writes two to four points one per cell, and "notes" adds how the figure was calculated. Install Quiriz for Google Sheets and try the question on your own data.
Ask the question, get the table
Quiriz answers business questions in a Google Sheets cell, from your imported files, scheduled Google Sheets and connected tools. Free to start.
Install for Google Sheets →Free on the Google Workspace Marketplace. Or try it on sample data first, no signup.