Year-over-year growth percentage
Growth is the change divided by the earlier value. Format the result as a percentage, and the formula returns blank when last year is zero.
=IFERROR((C2-B2)/B2,"")The sheet: Column B is last year's revenue and column C is this year's revenue for each product.
How it works, step by step
- 01C2-B2 is the change from last year to this year.
- 02Dividing by B2 expresses the change relative to last year's value.
- 03IFERROR returns an empty cell instead of #DIV/0! when B2 is 0 or blank.
- 04Apply the Percentage format to show 0.15 as 15%.
The same logic in four tools
=IFERROR((C2-B2)/B2,"")=IFERROR((C2-B2)/B2,"")SELECT product,
(revenue_this_year - revenue_last_year) / NULLIF(revenue_last_year, 0) AS yoy
FROM revenue;df["yoy"] = (df["this_year"] - df["last_year"]) / df["last_year"]Mistakes that break it
- !If last year's value is negative, the percentage sign is misleading. Check how your report treats losses.
- !IFERROR hides every error, not just divide by zero. Use IF(B2=0,"",...) to be specific.
- !pandas returns inf, not an error, when the previous value is 0.
- !Growth in percentage points is a different measure from percentage growth.
Common questions
- How do I calculate month-over-month growth?
- The same formula works. Use the previous month as the base.
- How do I compare a long series?
- With data in time order, pandas has pct_change(), and in a sheet you can fill the formula down comparing each row to the one above.
Got a version of this with your own ranges?
Paste it into the free translator and get the same breakdown for your exact formula. To run it against a real file, upload the CSV and describe the formula you need in a sentence.