Free guide · Sample size · Crossover designUpdated October 17, 2026

Crossover trial sample size calculator for a 2x2 design

When every participant receives both treatments in random order, the number you need depends on the within-subject SD, not the total SD. Get n per sequence for an AB/BA trial with a continuous outcome, see how it compares with a parallel design, and note where carry-over can break it.

  • n per sequence from the within-subject SD
  • Worked comparison with a parallel design
  • Carry-over and washout assumptions

Free sandbox · No credit card · 21 CFR Part 11 aligned

Demo: 2x2 crossover, systolic BP, 22 participants per sequence
AssessmentScreeningPeriod 1WashoutPeriod 2End of study
Sequence AB (n = 22)AWB
Sequence BA (n = 22)BWA

A and B are the two treatments; W is the washout between periods.

Difference 5 mmHg, within-subject SD 8 mmHg, alpha 0.05 two-sided, 80% power: 44 participants in total.

What this page calculates

  • For a 2x2 (AB/BA) crossover with a continuous outcome, the sample size per sequence is n = σw² (z₁₋α/2 + z₁₋β)² / δ², where σw is the within-subject SD and δ the treatment difference you want to detect. The total is twice that.
  • Worked example: a 5 mmHg difference with a within-subject SD of 8 mmHg, two-sided alpha 0.05 and 80% power gives 20.1 by the formula, so 22 per sequence (44 in total) once the small-sample t-correction is allowed for.
  • The same question in a parallel-group trial with a between-subject SD of 10 mmHg (total SD 12.8) needs about 206 participants. The crossover needs about one fifth as many, because each person is their own control.
  • The saving disappears if the design is wrong for the condition. Carry-over from period 1 into period 2, a disease that changes between periods, or dropouts after period 1 all damage a crossover, and the data cannot be rescued by a test for carry-over.
  • Use the SD of within-subject variation (or the SD of paired differences divided by √2). Using the ordinary SD from a parallel-group paper makes the answer far too big.

The calculation

The formula, where it comes from and a worked example

In an AB/BA design, participants are randomised to receive treatment A then B, or B then A, with a washout in between. For each participant you form the difference between their two measurements, A minus B. If σw is the within-subject SD, the variance of one participant’s difference is 2σw². The treatment effect is estimated by half the difference between the mean differences in the two sequences, which removes the period effect, and with n participants in each sequence its variance is σw²/n. Setting the usual power condition gives n per sequence = σw² (z₁₋α/2 + z₁₋β)² / δ² and a total of 2n. For two-sided alpha 0.05 and 80% power the two z values are 1.960 and 0.842, their sum squared is 7.85, so n = 7.85 σw² / δ² per sequence (Chow, Shao and Wang; Julious).

Suppose you want to detect a 5 mmHg difference in systolic blood pressure between two drugs, and earlier crossover studies suggest a within-subject SD of 8 mmHg. Then n = 7.85 × 64 / 25 = 20.1, which rounds up to 21 per sequence. The formula treats σw as known, whereas the trial will estimate it from 2n − 2 degrees of freedom. A simulation of the actual t-test shows 21 per sequence reaches 79.8% power and 22 reaches 81.5%, so the page plans for 22 per sequence, 44 in total. The usual shortcut is to add z₁₋α/2² / 4 (about 0.96) to the formula result and round up, which gives the same 22. At 90% power the normal formula gives 27 per sequence for the same inputs.

If a paper reports the SD of the paired differences (σd) rather than σw, convert with σw = σd / √2. A paired-difference SD of 11.3 mmHg is the same information as a within-subject SD of 8 mmHg, and the formula in terms of σd is n = σd² (z₁₋α/2 + z₁₋β)² / (2δ²). Mixing the two versions is the usual way to end up with a trial twice or half the size it should be.

Sensitivity

Participants per sequence by difference and within-subject SD

Two-sided alpha 0.05, 80% power, 2x2 design, normal formula plus the t-correction (+ z²/4), rounded up. Multiply by 2 for the total.

Difference to detectσw = 6σw = 8σw = 10σw = 12
3 units335789127
4 units19335172
5 units13223347
6 units9152333
8 units691419

Illustrative values from the formula. Halving the difference roughly quadruples n; a 50% larger SD multiplies it by about 2.2.

Crossover vs parallel

How much a crossover saves, and why it depends on between-subject variation

A parallel-group trial compares different people, so the outcome SD combines within-subject variation (σw) and between-subject variation (σb). The two-means sample size calculator needs that total SD. A crossover compares each person with themselves, so σb drops out of the treatment contrast entirely. That is the whole attraction of the design: when people differ a lot from each other and little from day to day, the saving is large.

Keep the same example, with a 5 mmHg difference and σw = 8 mmHg, and vary the between-subject SD. With σb = 0 the parallel trial needs 41 per group (82 in total) against 42 for the crossover, a saving of about half from using each participant twice. With σb = 10 the total SD is 12.8, a parallel trial needs 103 per group (206 in total) and the crossover still needs 42 by the same normal formula, almost five times fewer. With σb = 15 the parallel total is 364, almost nine times the crossover.

Total participants for the same question (difference 5, σw = 8, 80% power)

Crossover, total

42

Parallel, σb = 10

206

Ratio

4.9x

Crossover42/364

42 in total

Parallel, σb = 082/364

82 in total

Parallel, σb = 5112/364

112 in total

Parallel, σb = 10206/364

206 in total

Parallel, σb = 15364/364

364 in total

Normal-formula totals, no dropout. The crossover advantage grows with the ratio of between- to within-subject variation.

Assumptions

Carry-over, washout and the conditions a crossover needs

The formula assumes the only systematic difference between the two measurements on a person is the treatment, plus a period effect that cancels between sequences. That holds only if the effect of period 1 has gone before period 2 starts. A washout long enough to remove the first treatment (several half-lives for a drug, or the time for a biomarker to return to baseline) is the design’s main protection against carry-over, and it is a clinical and pharmacological decision for the protocol, not a statistical one.

A crossover is a reasonable choice when the condition is chronic and stable, the treatments act quickly and wear off completely, and the outcome is measured repeatedly without being changed by being measured. It is a poor choice for conditions that are cured or progress, for treatments with long-lasting or irreversible effects, and for outcomes such as death or a first event. Many authors, following Senn and Freeman (1989), also advise against a preliminary test for carry-over followed by a switch to a period-1-only analysis: the test has little power and the procedure inflates error rates. Decide in the protocol that carry-over is excluded by design, and argue it from the washout, rather than hoping to test it away.

Dropout works differently from a parallel trial. A participant who leaves after period 1 provides no within-subject contrast. Convert evaluable pairs into enrolment by dividing by (1 − dropout): with 22 per sequence and 15% expected dropout, enrol 22 / 0.85 = 25.9, so 26 per sequence, 52 in total. The dropout-adjusted sample size calculator explains why dividing is correct and adding 15% is not. Crossovers also lengthen each participant’s time in the study, which raises dropout, so a realistic assumption matters more than usual.

Turn the design into a study you can test

Build the eCRFs, visit schedule and randomization in the free sandbox with every feature. No credit card. You pay only when you go live.

Build your study free

From the number to the protocol

How to write the justification, and how a crossover is built in Capture

ICH E9 asks the protocol to state the sample size, the method, the primary variable and the assumed values with their sources. A sentence that does this reads: “A total of 44 evaluable participants (22 per sequence) provides 80% power to detect a within-subject difference of 5 mmHg in systolic blood pressure between treatments A and B, assuming a within-subject SD of 8 mmHg, using a paired comparison at the two-sided 5% level in an AB/BA crossover design with a washout of 14 days. Allowing for 15% dropout, 52 participants will be randomised.” The statistician should confirm the SD source and the analysis model (a mixed model with sequence, period and treatment as fixed effects and participant as random is typical). The wider how to write a clinical trial protocol guide places this section in context, and the sample size calculation entry defines the terms.

In Capture, the build follows the design. Randomization allocates each participant to a sequence in the ratio you planned. The visit schedule holds period 1, the washout and period 2, with visit windows so the washout is not shortened by an early visit. The primary measurement is a numeric eCRF field with a unit and a range edit check, so an implausible value raises a query while the participant is still at the site. The field-level audit trail records old value, new value, user, time and reason for every change, and CSV or Excel exports come with a data dictionary for analysis. Other planning pages: the power analysis calculator states what a fixed n can detect, the pilot study sample size calculator helps when the within-subject SD is unknown, and the repeated measures sample size calculator covers several measurements per person within one treatment.

Before you lock it

Crossover sample size checklist

Design is justified

Stable chronic condition, reversible treatments, outcome that is not changed by earlier periods.

Washout is argued

Length tied to half-lives or biomarker recovery, with a source.

SD is within-subject

σw, or σd / √2 from a paired analysis; not the SD from a parallel-group paper.

Difference is justified

Smallest clinically important difference with a source.

Sensitivity checked

Re-run with an SD 20% higher and a difference 20% smaller.

Dropout converted to enrolment

Evaluable pairs / (1 − dropout), rounded up per sequence.

Analysis model named

Sequence, period and treatment effects, participant random, carry-over excluded by design.

FAQ

Questions teams ask before they switch

Something not covered here? Ask us directly.

What is the sample size formula for a 2x2 crossover trial?

For an AB/BA design with a continuous outcome, n per sequence = σw² (z₁₋α/2 + z₁₋β)² / δ², where σw is the within-subject SD and δ the treatment difference to detect. The total is 2n. With a 5 mmHg difference, σw of 8 mmHg, alpha 0.05 and 80% power the formula gives 20.1; planning for the t-test gives 22 per sequence, 44 in total.

Which standard deviation do I use?

The within-subject SD (residual SD from a model with participant as a factor), or the SD of the paired differences divided by √2. The SD from a parallel-group trial includes between-subject variation that a crossover removes, so using it overstates the sample size badly.

How does a crossover compare with a parallel design?

With a within-subject SD of 8 and a between-subject SD of 10, detecting 5 units at 80% power needs about 206 participants in a parallel trial and 42 to 44 in a crossover. If between-subject variation is zero the ratio falls to about two. The saving depends entirely on how much of the variance is between people.

What is carry-over and why does it matter?

Carry-over is the effect of the period 1 treatment persisting into period 2. It biases the treatment contrast, and unlike a period effect it does not cancel between sequences. The protection is a washout long enough to remove the first treatment, argued from half-lives or biomarker recovery. A preliminary statistical test for carry-over is not a reliable fix.

How do I allow for dropout in a crossover?

Divide the evaluable number per sequence by (1 − expected dropout) and round up. A participant who leaves after period 1 gives no within-subject contrast, so each dropout costs a full pair. With 22 per sequence and 15% dropout, enrol 26 per sequence.

Does this work for binary or time-to-event outcomes?

No. The formula is for a continuous outcome analysed on the within-subject difference. Binary crossover outcomes need different methods (such as McNemar-type or conditional logistic approaches), and time-to-event outcomes are rarely suitable for a crossover at all.

Can Capture run a crossover study?

Capture lets you build the visit schedule for both periods and the washout, with visit windows, randomize participants, and collect the outcome in numeric eCRF fields with range checks and a field-level audit trail. Build and test it in the free sandbox, and ask in a demo if your design has features you want to confirm.

Is this calculation validated?

It is a planning aid, checked against a simulation of the actual t-test. A statistician should confirm the design, the SD, the analysis model and the final sample size before a protocol is submitted.

Plan the number, then build the periods

Build the eCRFs, visit schedule and randomization in the free sandbox with every feature. No credit card. You pay only when you go live.

Build your study free