
Dan Patiño
AI Strategy & Innovation at Coderhouse
Data
Year-over-year (YoY) growth compares a metric in one period with the same period one year earlier and expresses the change as a percentage. This November's revenue against last November's, this quarter's sign-ups against the same quarter a year ago, this week's orders against the same week last year: all of them are YoY comparisons.
Data analysts use YoY constantly because it answers a question stakeholders ask in almost every meeting: are we actually growing, or is this just the season? It is one of the simplest metrics in analytics, and also one of the easiest to calculate or read the wrong way.
The YoY growth formula
As Investopedia summarizes it, you divide the current period's value by the value for the same period a year earlier, subtract one and multiply by 100:
YoY growth % = (current period ÷ same period last year − 1) × 100
Which is equivalent to (current − prior) ÷ prior × 100.
An illustrative example:
Revenue this November: 130,000
Revenue last November: 104,000
YoY growth: (130,000 ÷ 104,000 − 1) × 100 = 25%
Why analysts compare against last year instead of last month
Most businesses have seasons. Retail peaks around the holidays, education spikes when enrollment opens, travel follows vacations. Comparing December with November will almost always look like growth for a retailer, and January will almost always look like a collapse. Investopedia notes that YoY comparisons help mitigate seasonality because you compare the same months or quarters across years.
That makes YoY a quick, intuitive alternative to formal seasonal adjustment. The U.S. Census Bureau defines seasonal adjustment as estimating and removing the seasonal component, plus trading-day and moving-holiday effects, so that movements are easier to analyze over consecutive periods. Official statistics use dedicated software for that. In a business dashboard, a YoY column is often enough to see the real trend at a glance.
YoY vs. other period comparisons
Month-over-month (MoM) and quarter-over-quarter (QoQ)
These compare a period with the one immediately before it, sometimes called sequential growth. They react faster to recent changes but mix in seasonal swings. Many teams show MoM and YoY side by side.
Year-to-date (YTD)
YTD is a running total since the start of the year. "YTD vs. last YTD" compares, for example, January through November of this year with January through November of last year. It smooths out single-month noise.
Trailing twelve months (TTM)
TTM sums the last 12 months, regardless of where the calendar year starts. Comparing TTM with the previous TTM is a stable way to see long-term direction, closely related to a moving average.
How to calculate YoY in SQL, Python, spreadsheets and Power BI
SQL: with monthly data and no gaps, the LAG window function fetches the value from 12 rows earlier: revenue / LAG(revenue, 12) OVER (ORDER BY month) - 1. If SQL window functions are new to you, start there. When months may be missing, join the table to itself on month = previous_month + 12 months instead of counting rows.
Python: in pandas, df["revenue"].pct_change(periods=12) on a monthly series returns the YoY change as a decimal. Make sure the index is a complete, sorted monthly calendar first.
Excel or Google Sheets: with months in rows, a formula like =B14/B2-1 formatted as a percentage compares row 14 with the row twelve months above it.
Power BI (DAX): Microsoft documents SAMEPERIODLASTYEAR, which shifts the dates in the current filter context one year back. A prior-year measure looks like CALCULATE(SUM(Sales[Amount]), SAMEPERIODLASTYEAR('Date'[Date])), and YoY % is the current measure divided by that one, minus one. It needs a proper date table to work reliably.
Common mistakes when reading YoY growth
Tiny or negative bases. Going from 2 to 10 customers is "+400%", which says little. When the prior value is zero, YoY is undefined; when it is negative (for example a loss turning into profit), the percentage is misleading. Show the absolute change instead.
Unequal periods. A month with five weekends, a leap day or a holiday that moved from one month to another can distort a single-month comparison. The Census Bureau calls these calendar effects. Note them or compare longer periods.
Comparing against an unusual year. If last year had a one-off spike (a viral campaign, an outage), this year's YoY will look bad or good for reasons unrelated to today's performance. Check two years back for context.
Averaging YoY rates. Averaging monthly YoY percentages is not the same as the YoY change of the totals. For quarters or years, sum the values first, then calculate the growth.
Partial periods. Comparing this month-to-date with all of last month guarantees a scary drop. Compare equal date ranges.
Changed definitions. If the way a metric is counted changed during the year, the YoY comparison is apples to oranges. The Census Bureau stresses that a time series needs consistent definitions and measurement over time.
Where YoY shows up in real analysis
Executive dashboards: revenue, orders and active users with a YoY column next to each KPI.
Marketing reports: traffic and conversions compared with the same campaign period last year.
Financial reporting: public companies routinely report quarterly results on a YoY basis.
Forecasting: last year's same period is a common baseline before building a model in a time series analysis.
Calculating these comparisons in SQL, Python and Power BI, and explaining them clearly to stakeholders, is exactly the kind of everyday work covered in the Data Analytics Course at Coderhouse.
FAQ
Is YoY the same as year-on-year?
Yes. "Year-over-year", "year-on-year", YoY and YOY all describe the same comparison.
Can YoY growth be calculated weekly?
Yes, but align weeks carefully. Comparing ISO week numbers (week 48 vs. week 48) usually works better than comparing calendar dates, because the same date falls on a different weekday each year.
Is YoY growth the same as CAGR?
No. YoY measures the change between two consecutive years or periods. Compound annual growth rate (CAGR) summarizes the average yearly growth across several years.
Keep learning with Coderhouse
Reading growth correctly is a core skill for anyone who builds reports or advises on decisions. Explore the path that fits your goals:
Data Analytics Course — learn SQL, Python and Power BI to calculate, visualize and explain business metrics like YoY growth.
Forward Deployed AI Engineering Course — learn to build, integrate and deploy AI agents and LLM apps on top of real business data.
GTM Engineer Course (waitlist) — join the waitlist for early access to the program focused on automating go-to-market workflows with AI.
I'm Dan Patiño, head of AI Strategy & Innovation at Coderhouse. My day-to-day work involves merging the tactical management of e-commerce (CRO, Email Marketing and SEO) with the development of disruptive solutions. I specialize in building internal AI-powered apps to automate tasks and boost innovation within the team. I firmly believe that technology is strategy's best ally. To dive deeper into my professional journey, I'll be waiting for you on my LinkedIn profile.