
How to Compare Time Periods in Google Analytics
"Is traffic up or down?" is one of the first questions anyone asks about a website, and the honest answer is always "compared to what?" A 20% traffic increase looks great against last month, but might look flat or worse against the same period last year if your business is seasonal. Comparing time periods correctly in Google Analytics 4 is less about clicking the right button and more about picking the right comparison in the first place.
This guide covers how to set up date comparisons in GA4, which comparison actually answers your question, and the traps that lead people to draw the wrong conclusion from the same data.
Setting Up a Basic Date Comparison
- Open any report in GA4 (Reports or an Exploration).
- Click the date range selector in the top-right corner.
- Set your primary date range.
- Toggle Compare on.
- Choose a comparison period — GA4 offers Preceding period, Same period last year, or a Custom range.
- Click Apply.
Once applied, most GA4 charts and tables will show both periods side by side, along with a percentage change indicator.
Choosing the Right Comparison
- Preceding period (e.g., this 30 days vs. the previous 30 days) is best for short-term, non-seasonal trend checks — did last week's campaign move the needle compared to the week before?
- Same period last year is essential for anything seasonal — retail around holidays, back-to-school content, tax season traffic. Comparing December to November for a gift-focused store tells you almost nothing useful; comparing this December to last December does.
- Custom period is useful for campaign-specific analysis — comparing the two weeks after a product launch to the two weeks before it, regardless of calendar alignment.
A common mistake is defaulting to "preceding period" out of habit even when the business is seasonal, which produces comparisons that look alarming (or great) for reasons that have nothing to do with your actual performance.
Comparing Segments Instead of Just Dates
GA4 also lets you compare non-date dimensions side by side using the same Compare feature — for example, this month's traffic from Organic Search versus Paid Search, or New users versus Returning users. This is available directly in Explorations, where you can add up to four comparisons at once:
- Open Explore → Free form.
- In the Comparisons card, click Add comparison.
- Choose a dimension and value (e.g., Session default channel group = Organic Search).
- Add a second comparison for Paid Search.
- Both segments now appear side by side across every chart in that exploration.
This is a more flexible way to compare than the basic date picker, since you can combine a date comparison and a segment comparison in the same view.
Watch Out for Partial-Period Comparisons
If you're looking at data for "today" or "this week" and comparing it to the same partial period previously, make sure both periods cover an equivalent amount of elapsed time. Comparing the first four days of this month to the entire previous month will always show a steep, meaningless decline. GA4's preceding-period comparison handles this correctly for full ranges, but be careful with custom ranges you build by hand.
Pulling Period Comparisons via the API
For a recurring report — say, a weekly performance email — it's often easier to pull both periods programmatically and calculate the delta yourself than to screenshot the UI:
npm install @google-analytics/data
const { BetaAnalyticsDataClient } = require("@google-analytics/data");
const analyticsDataClient = new BetaAnalyticsDataClient();
async function compareWeeks(propertyId) {
const [response] = await analyticsDataClient.runReport({
property: `properties/${propertyId}`,
dateRanges: [
{ startDate: "7daysAgo", endDate: "yesterday", name: "current_week" },
{ startDate: "14daysAgo", endDate: "8daysAgo", name: "previous_week" },
],
dimensions: [{ name: "dateRange" }],
metrics: [{ name: "sessions" }, { name: "conversions" }],
});
response.rows.forEach((row) => {
console.log(
row.dimensionValues[0].value,
row.metricValues.map((m) => m.value),
);
});
}
compareWeeks("123456789");
Requesting two named date ranges in a single runReport call returns both periods in one response, tagged by the dateRange dimension, so you don't need two separate API calls and a manual join.
Building Recurring Comparisons in Looker Studio
If you report on period-over-period changes regularly, it's worth setting this up once in Looker Studio rather than rebuilding it in GA4 every time:
- Connect a Looker Studio report to your GA4 property.
- Add a date range control set to a rolling window (e.g., last 28 days).
- In the chart's data settings, enable Comparison date range and set it to the preceding period.
- Add a scorecard with a percentage-change indicator, which Looker Studio calculates automatically.
This gives stakeholders a live, always-current comparison instead of a static screenshot that goes stale the next week.
FAQ about Comparing Time Periods in Google Analytics

What's the difference between "preceding period" and a custom comparison?
Preceding period automatically selects the immediately prior range of equal length. A custom comparison lets you pick any two arbitrary date ranges, useful for comparing specific campaigns or events regardless of calendar alignment.
Why does GA4 show a huge percentage change for a very short date range?
Small sample sizes are noisy — a jump from 3 conversions to 6 conversions is a "100% increase" but isn't statistically meaningful. Use longer date ranges for percentage comparisons to be trustworthy.
Can I compare more than two time periods at once?
The standard date comparison supports two ranges. In Explorations, you can combine a date comparison with segment comparisons to look at more dimensions simultaneously, but you can't stack three or more distinct date ranges in one chart.
Does comparing periods work the same way in every report?
Most standard reports and Explorations support it, but a few real-time and technical reports don't support date comparison since they're inherently point-in-time.
How do I compare year-over-year traffic if my site is less than a year old?
You can't meaningfully use "same period last year" without a full year of data — in that case, compare against the preceding period or a specific custom range instead.
Is there a way to get notified automatically when a period-over-period change is large?
Yes — set up a custom insight or alert under Admin → Custom Insights, which can notify you when a metric changes beyond a threshold you define.
Conclusion
Comparing time periods correctly is what turns Google Analytics numbers into an actual answer instead of a number that just sounds good or bad. Pick the comparison that matches the question you're actually asking — seasonality, campaign impact, or short-term trend — and be skeptical of any percentage change built on a tiny sample. Get the comparison right, and the data will tell you something true about your website that a single number never could.


