FreeStatisticalTools.com
Panel data and causal inference

Interrupted Time Series (Campaign Impact) Analysis

Measure the impact of a campaign, product launch, price change or policy on a time series. Segmented regression estimates the pre-existing trend, then the immediate level change and the change in slope after the intervention, and compares the outcome with the counterfactual that the old trend implies.

Free · No sign-upReplaces Stata itsa · R CausalImpactWorks with your data
Updated · By Bibin Xavier

Data 48 × 3

Paste from Excel, or drop a CSV, TSV or Excel file here.
Example data 48 rows, 3 variables. Data stays in this browser tab.
Monthtext · 48 levelsSign_UpsnumericSite_Visits_knumeric
2022-01515241
2022-02517235
2022-03524277
2022-04565305
2022-05583290
2022-06588324
2022-07594275
2022-08565268

Variables and options

Control series (optional) 0 selected
Results update automatically when you change an option.

Results

48 rows · example data
Immediate level change+44.40p < .001
Change in slope per period+2.245p < .001
Average effect after+65.729.8% vs counterfactual
Cumulative effect+1,18395% CI [908, 1,458]
Table 1

Segmented regression

TermCoefficientSE (Newey-West)tp95% CI
Intercept535.74115.819192.07< .001[523.980, 547.502]
Pre-intervention trend (per period)3.37280.296111.39< .001[2.774, 3.971]
Level change at intervention44.39726.35536.99< .001[31.553, 57.242]
Slope change after intervention2.24480.49104.57< .001[1.252, 3.237]
sin(1)-8.38412.7657-3.03.004[-13.974, -2.795]
cos(1)-15.70343.0302-5.18< .001[-21.828, -9.579]
sin(2)-0.06133.0508-0.02.984[-6.227, 6.105]
cos(2)1.70213.33400.51.612[-5.036, 8.440]

Note. yt = β₀ + β₁t + β₂Dt + β₃(t − T₀ + 1)Dt + …, where Dt = 1 from 2024-07 on. 30 periods before and 18 after. R² = .972; Durbin-Watson = 1.64; Ljung-Box p = .023.

Table 2

Effect summary

MeasureEstimate95% CIRelative to counterfactual
Effect in the first period after46.64[33.84, 59.44]7.1%
Effect in the last period (2025-12)84.80[63.68, 105.93]12.4%
Average effect per period65.72[50.43, 81.02]9.8%
Cumulative effect1183.0[907.7, 1458.3]9.8%

Observed, fitted and counterfactual

Estimated effect over time

Interpretation

Before the intervention the outcome changed by 3.37 per period. At 2024-07 the level rose by 44.40 (p < .001) and the slope increased by 2.245 per period (p < .001). Compared with the counterfactual continuation of the earlier trend, the outcome was on average 65.72 higher per period after the intervention, a cumulative gain of 1,183 (9.8%). The 95% confidence interval of the cumulative effect excludes zero. The estimate is causal only if nothing else changed at the same time; adding a control series strengthens the design.

An interrupted time series analysis (30 pre- and 18 post-intervention periods, Newey-West standard errors) showed a level change of 44.40, 95% CI [31.55, 57.24], p < .001, and a slope change of 2.245 per period, p < .001. The cumulative effect was 1183.0 (9.8% relative to the counterfactual).

How to cite this tool

Using these results in a thesis, journal article, report or class assignment? Please cite this free tool so others can find it. It keeps the site free.

APA 7

Xavier, B. (2026). Interrupted Time Series (Campaign Impact) Analysis [Web application]. FreeStatisticalTools.com. https://freestatisticaltools.com/interrupted-time-series-analysis/

BibTeX

@software{xavier_interruptedtimeseries_2026,
  author = {Xavier, Bibin},
  title = {Interrupted Time Series (Campaign Impact) Analysis},
  publisher = {FreeStatisticalTools.com},
  year = {2026},
  url = {https://freestatisticaltools.com/interrupted-time-series-analysis/},
  note = {Web application}
}
Download citation:

Suggested sentence for your methods section: “The analysis was carried out with the free Interrupted Time Series (Campaign Impact) Analysis tool on FreeStatisticalTools.com (Xavier, 2026).”

What is interrupted time series analysis?

Interrupted time series analysis estimates the effect of an intervention that starts at a known time, such as a campaign, launch or policy. Segmented regression estimates the pre-intervention trend, the immediate level change and the change in slope, and compares the observed outcome with the counterfactual continuation of the earlier trend, with autocorrelation-robust standard errors.

When to use interrupted time series analysis

Use interrupted time series when an intervention (campaign, launch, price change, policy, website redesign) starts at a known time and you have a series of regular observations before and after it, but no randomised control group.

Assumptions

  • The pre-intervention trend would have continued without the intervention (no other change at the same time).
  • Enough periods before and after (ideally 8 or more each) to estimate trends reliably.
  • Autocorrelation is handled by Newey-West standard errors; strong seasonality should be modelled.

How to set up your data

One row per period in time order with the outcome, an optional period label and optional control series (such as traffic or a comparison market that the intervention did not affect).

What interrupted time series analysis is

Interrupted time series (ITS) analysis estimates the effect of an intervention that starts at a known point in time, using repeated observations before and after it. Examples in marketing include a new advertising campaign, a website redesign, a price change, a loyalty programme launch or a change of agency; in public health and policy, a new law, a tax or a vaccination programme. When a randomised experiment is not possible, ITS is one of the strongest quasi-experimental designs, because the pre-intervention trend provides a counterfactual: what would probably have happened without the intervention.

Segmented regression

The standard analysis is segmented regression (Wagner et al., 2002):

Yt = β0 + β1·time + β2·Dt + β3·(time since intervention)·Dt + seasonality + controls + et

  • β1 is the pre-intervention trend: how much the outcome changed per period before the intervention.
  • β2 is the level change: the immediate jump (or drop) in the outcome at the start of the intervention, compared with the extrapolated pre-trend.
  • β3 is the slope change: how much the trend per period changed after the intervention. The post-intervention trend is β1 + β3.

The counterfactual is the fitted line with β2 and β3 set to zero. The effect in post-intervention period k is β2 + β3·k, and the tool adds these up to give the average and cumulative effects, with confidence intervals that account for the covariance between β2 and β3, and expresses them relative to the counterfactual.

Autocorrelation and seasonality

Time series observations are rarely independent: this month’s sales are related to last month’s. Ordinary standard errors then overstate precision. The tool uses Newey-West (heteroskedasticity- and autocorrelation-consistent) standard errors by default, and reports the Durbin-Watson statistic and a Ljung-Box test on the residuals. Seasonality can make an intervention look effective (or ineffective) simply because it started before a seasonal peak; choose the seasonal option to add yearly Fourier terms for monthly, weekly or quarterly data.

Adding a control series

The main threat to ITS is another event that happened at the same time as the intervention. A control series strengthens the design: an outcome or market that was not affected by the intervention but shares the same external influences, such as sales in a region where the campaign did not run, traffic to unaffected pages, or overall category sales. Adding it as a control variable adjusts the counterfactual for common shocks. When you have several untreated units, the synthetic control method on this site builds the comparison more formally, and difference-in-differences is another option.

Worked example with the built-in data

The example contains 48 months of sign-ups; a marketing campaign began in July 2024, after 30 pre-campaign months. With seasonality modelled and Newey-West standard errors, sign-ups were growing by 3.37 per month beforehand. At the start of the campaign, the level rose by 44.4 sign-ups (95% CI 31.6 to 57.2, p < .001), and the monthly growth increased by 2.24 (p < .001). Compared with the counterfactual continuation of the earlier trend, the campaign added on average 65.7 sign-ups a month over the 18 post-campaign months, a cumulative 1,183 (95% CI 908 to 1,458), or 9.8% more than expected without it. The effect grows over time, from 7% in the first month to 12% by the end.

Designing a good ITS study

  • Enough data points: aim for at least 8 to 12 periods before and after the intervention; more pre-periods give a better estimate of the counterfactual trend.
  • A clearly defined start date: if the intervention was phased in, consider excluding a transition period or modelling a lag.
  • Consistent measurement: make sure the outcome was measured the same way throughout (no tracking changes at the intervention date).
  • Check for co-interventions: list other events around the start date, such as price changes, competitor launches or seasonal events.
  • Look at the data: the chart of observed, fitted and counterfactual values shows whether a linear pre-trend is plausible.

Specifying the intervention point

Enter the first period after the intervention exactly as it appears in the period column (for example 2024-07), or its row number if you have no period column. Everything from that row onward is coded as post-intervention. If you leave the box empty the tool uses the middle of the series and warns you, which is only useful for exploration.

Limitations

  • ITS assumes the pre-intervention trend would have continued. Long post-periods extrapolate further and are more uncertain.
  • Non-linear trends, structural breaks unrelated to the intervention, or anticipation effects (people reacting before the start) bias the estimates.
  • Gradual or delayed effects are captured only partly by the level-and-slope model; inspect the effect-over-time chart.

Reporting

Report the number of pre- and post-intervention periods, the model (seasonality, controls, standard errors), the level and slope changes with 95% CIs, and the cumulative or average effect relative to the counterfactual, with the chart. Example: “Segmented regression with Newey-West standard errors (30 pre- and 18 post-intervention months) showed an immediate increase of 44.4 sign-ups, 95% CI [31.6, 57.2], p < .001, and a slope increase of 2.24 per month, p < .001, a cumulative effect of 1,183 sign-ups (9.8% above the counterfactual).”

Glossary of interrupted time series terms

  • Pre-intervention trend: the slope of the outcome before the intervention, estimated from all pre-period observations.
  • Level change: the immediate shift in the outcome at the start of the intervention relative to the extrapolated trend.
  • Slope change: the change in the outcome’s per-period trend after the intervention.
  • Counterfactual: the predicted outcome had the intervention not happened, based on the pre-intervention model.
  • Autocorrelation: correlation between consecutive observations of a time series, which makes ordinary standard errors too small.
  • Newey-West standard errors: standard errors that remain valid when residuals are autocorrelated and heteroskedastic.
  • Fourier terms: pairs of sine and cosine terms that model a smooth seasonal pattern with few parameters.
  • Co-intervention: any other change that happens at the same time as the intervention and could explain the effect.

Key references: Wagner, Soumerai, Zhang and Ross-Degnan (2002), Journal of Clinical Pharmacy and Therapeutics; Bernal, Cummins and Gasparrini (2017), International Journal of Epidemiology; Brodersen et al. (2015), Annals of Applied Statistics (CausalImpact).

How to use this tool

  1. Enter your data. Paste columns from Excel, Google Sheets or SPSS with variable names in the first row, or upload a CSV or Excel file. The example data shows the expected layout.
  2. Choose the variables. Select the outcome series, period (optional) and control series (optional).
  3. Set the options. Fill in intervention starts at (period value or row number), seasonality and standard errors.
  4. Read the results. Results update automatically. Read the plain-English interpretation, then use Copy table to paste APA-style tables into Word and Copy for the results sentence.

How to report interrupted time series analysis in APA style

Report the pre-intervention trend, the level and slope changes with 95% CIs, and the average or cumulative effect relative to the counterfactual, with the chart.

Frequently asked questions

What is segmented regression?

A regression with a time trend, a post-intervention indicator (level change) and time since the intervention (slope change).

What is the counterfactual?

The fitted line without the level and slope change: what the outcome would have been if the earlier trend had continued.

How many data points do I need?

Ideally at least 8 to 12 periods before and after the intervention.

Why Newey-West standard errors?

Time series observations are autocorrelated; Newey-West standard errors remain valid under autocorrelation and heteroskedasticity.

How do I handle seasonality?

Choose the seasonal option to add yearly Fourier terms for monthly, weekly or quarterly data.

What is the main threat to validity?

Another event at the same time as the intervention. A control series or the synthetic control method strengthens the design.

Related tools

See also

Learn this method step by step in the free course Customer and Marketing Analytics, with exercises and a certificate.

Browse all categories