Home / Sheets questions cookbook / Year-over-year comparison
Google Sheets · Question cookbook

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.

By · Published November 8, 2026

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

ABCDEFGHIJK
1DateOrder IDCustomerRegionChannelProductCategoryQtyUnit priceRevenueCost
22025-01-01SO-10001Tin Roof CaféNortheastSales repSip Lids (case of 1,000)Supplies654324198
32025-01-01SO-10001Tin Roof CaféNortheastSales repEspresso Roast 5 lbCoffee1068680370
42025-01-01SO-10002Foxglove CaféNortheastOnline storeSip Lids (case of 1,000)Supplies1545433
52025-01-01SO-10002Foxglove CaféNortheastOnline storeCold Brew Concentrate 1 galCoffee842336152
62025-01-01SO-10003Ember CaféMidwestOnline storeSip Lids (case of 1,000)Supplies454216132
…8,115 more rows
Orders

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.

Example on sample data
fx=SUMIFS(Orders!$J:$J, Orders!$A:$A, ">="&EDATE($A2,-12), Orders!$A:$A, "<"&EDATE($A2,-11))
ABCD
1Month20252026Change
2Jan$114,370$122,5877.2%
3Feb$89,015$103,39016.1%
4Mar$91,596$130,19542.1%
5Apr$123,970$128,1363.4%
6May$113,465$125,64610.7%
7Jun$102,323$136,41133.3%
8Jul$110,643$127,76915.5%
9Aug$120,222$141,01517.3%
10Sep$130,929$138,6355.9%
11Oct$120,229$142,47518.5%
12Jan-Oct$1,116,762$1,296,25916.1%
SummaryOrders

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

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:

Example on sample data
fx=QUIRIZ("revenue by month for January to October, 2025 vs 2026, with the percent change and a Jan-Oct total row", "table")
ABCD
1Month20252026Change
2Jan$114,370$122,5877.2%
3Feb$89,015$103,39016.1%
4Mar$91,596$130,19542.1%
5Apr$123,970$128,1363.4%
6May$113,465$125,64610.7%
7Jun$102,323$136,41133.3%
8Jul$110,643$127,76915.5%
9Aug$120,222$141,01517.3%
10Sep$130,929$138,6355.9%
11Oct$120,229$142,47518.5%
12Jan-Oct$1,116,762$1,296,25916.1%
Sheet1

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.

Frequently asked questions

How do I calculate year-over-year growth in Google Sheets?
Divide this year by last year and subtract 1: =C2/B2-1, formatted as a percent. To get last year's figure for the same month, use SUMIFS with EDATE(month,-12) as the start date and EDATE(month,-11) as the end.
How do I compare year to date with last year?
Sum the same months on both sides: January through the last complete month this year, against the same months last year. Comparing a partial year with a full one always looks like a decline.
Can a pivot table compare years in Google Sheets?
Yes. Add the date field to Rows and to Columns, then use Create pivot date group to group the rows by Month and the columns by Year.