Skip to main content
v2026.11,986 entries · CC-BY 4.0

Counterbalancing in Research: Definition, Examples and Latin Squares

Counterbalancing defined, with worked allocation tables for complete, Latin square and Williams designs, reverse counterbalancing (ABBA), reporting tips.

Written and maintained by CASRAI Editorial Board

Published · Last updated

On this page

Counterbalancing is a way of arranging the order in which participants (or units) meet the conditions of a within-subjects experiment so that each condition occurs equally often in each position. It stops the order of conditions from being confused with the effect of the conditions themselves. This guide defines the term, shows complete and partial counterbalancing with worked allocation tables, explains reverse counterbalancing (ABBA), and gives a template for reporting the scheme.

What is the definition of counterbalance? (counterbalancing meaning)

In research, to counterbalance is to vary the order of conditions systematically across participants so that every condition appears equally often in each serial position. One course handout (SJSU PSYC 120, M. Van Selst) puts it as arranging conditions “so that each condition occurs equally often in each position.” Outside research, “counterbalance” also has a general sense: a weight or force that offsets another. The research sense borrows that idea, since the order effects in one half of the sequences are offset by the opposite order effects in the other half.

Counterbalancing is used when the same participants take part in more than one condition. If every participant did condition A first and condition B second, any difference between A and B could be caused by the conditions or by doing something second. Counterbalancing spreads that order contribution evenly so it cannot masquerade as a treatment effect. See the within-subjects vs between-subjects comparison for when this design is used at all.

How does counterbalancing reduce order effects?

Two kinds of problem are involved, and they are not the same thing:

  • Order effects occur when “exposure to one level of the I.V. alters the behavior observed under subsequent levels” (SJSU handout). Typical forms are practice (performance improves) and fatigue (performance worsens).
  • Carryover effects occur when “the effects of one level of the manipulation are still present when the D.V. is assessed for another level” (SJSU handout).

Counterbalancing reduces order effects because a practice or fatigue trend that favours the later position is shared equally by all conditions. It does not remove carryover automatically: Kim and Stein (2009) note that “potential carryover effects are not balanced out by randomization,” and the same logic applies to any ordering that does not control which condition precedes which. Randomizing order alone gives balance only on average; counterbalancing guarantees it within the sample. Where the interval between conditions can be lengthened, a washout period lets lingering effects fade before the next condition begins.

Complete counterbalancing: how many orders?

Complete counterbalancing uses every possible order of the conditions. With k conditions there are k! orders (k factorial: k × (k − 1) × … × 1), so you need participants in multiples of k! to use each order equally often.

Conditions (k) Arithmetic Orders
2 2 × 1 2 (AB, BA)
3 3 × 2 × 1 6 (ABC, ACB, BAC, BCA, CAB, CBA)
4 4 × 3 × 2 × 1 24
5 5 × 4 × 3 × 2 × 1 120

With three conditions, 12 participants gives each of the 6 orders twice. With five conditions, even one participant per order needs 120 people, which is why designs with more than a few conditions switch to partial counterbalancing.

Partial counterbalancing and the Latin square example

Partial counterbalancing uses only a subset of the possible orders. A Latin square is the standard method; the SJSU handout describes it as “a method of counterbalancing that does not require all possible combinations (n! combinations).” In a Latin square each condition appears once in each row (sequence) and once in each column (position). See the Latin square design guide for the analysis side.

Example 1: a cyclic Latin square (4 conditions)

Build it by shifting each letter to the next letter in each row:

Sequence Position 1 Position 2 Position 3 Position 4
1 A B C D
2 B C D A
3 C D A B
4 D A B C

Every condition appears once in every position, so position is balanced. But check which condition follows which: the pair A then B occurs in sequences 1, 3 and 4 (three times), and B then A never occurs. This design does not balance first-order carryover.

Example 2: a Williams-type balanced square (4 conditions)

Sequence Position 1 Position 2 Position 3 Position 4
1 A B D C
2 B C A D
3 C D B A
4 D A C B

Each letter is still once per position. Now list the adjacent pairs: AB, BD, DC; BC, CA, AD; CD, DB, BA; DA, AC, CB. That is 12 pairs, and the 12 possible ordered pairs of four conditions (4 × 3) each appear exactly once. Kim and Stein (2009) describe this property for an even number of treatments: “each treatment immediately precedes and follows every other treatment exactly once.” The balanced design for residual effects is credited to Williams (1949). For an odd number of treatments, Kim and Stein state that first-order residual effects “can be balanced only if they are replicated an even number of times,” so odd-k designs use two squares (typically one with the sequences reversed) rather than one.

What is reverse counterbalancing (ABBA)?

Reverse counterbalancing presents the conditions in a sequence and then repeats them in the reverse order within the same participant, for example A B B A for two conditions. The arithmetic shows why it helps: A occupies positions 1 and 4 and B positions 2 and 3, so the position totals are equal (5 and 5). Any steady linear drift (a constant practice or fatigue change per trial) therefore affects both conditions equally. It does less for non-linear trends, and it requires that each condition can be presented more than once per person. It differs from block randomization, where the order within each block is shuffled and balance holds only in expectation.

What is an example of counterbalancing?

Suppose a study compares reading speed on two screen layouts, A and B, with 20 participants. Ten read layout A first and then B; ten read B first and then A. If people read faster the second time, layout A and layout B each get the second position half the time, so practice benefits both equally. A difference between layouts can then be interpreted separately from the order in which they were read. This is an illustrative example, not drawn from a specific study.

Assumptions and common mistakes

  • Treating counterbalancing as a cure for carryover. If the first condition permanently changes the participant (learning, a persisting drug effect), balancing position does not undo it; consider a between-subjects design. See crossover trial design and carryover for the washout approach.
  • Uneven assignment. If 13 participants are spread over 4 sequences, positions are no longer balanced. Recruit and assign in multiples of the number of sequences, and assign sequences from a randomized list.
  • Using a cyclic square when carryover matters. See Example 1: A followed B three times and never the reverse.
  • Counterbalancing items and conditions without saying which. Stimulus order and condition order are separate things to balance; state which one your scheme covers.
  • Ignoring order in the analysis. Counterbalancing equalizes order across conditions; it does not tell you whether an order effect exists. Including sequence as a factor lets you test it. Order is a confounding variable when it is not controlled.

How to report counterbalancing

State in the Method section the scheme, the number of conditions, the sequences, and how participants were assigned. A template (adapt the numbers): “Participants completed all four conditions. Condition order was partially counterbalanced using a 4 × 4 Williams-type Latin square, so that each condition appeared once in each position and followed each other condition once. Participants (N = 32) were randomly assigned to one of the four sequences, 8 per sequence. Sequence was entered as a between-subjects factor in the analysis.” If you used reverse counterbalancing, give the exact sequence (for example, ABBA) and the number of presentations per condition. This is an editorial template, not wording mandated by a style manual.

How to generate counterbalanced orders in Excel, R or Python

Excel

Number of complete orders: =FACT(4) returns 24. A cyclic Latin square cell for row r and column c (both starting at 0): =CHAR(65+MOD(r+c,4)).

R (base)

offsets <- c(0, 1, 3, 2)   # Williams first row for k = 4
square <- t(sapply(0:3, function(i) LETTERS[(offsets + i) %% 4 + 1]))
square   # rows are sequences: ABDC, BCAD, CDBA, DACB

Python

import itertools
conds = "ABCD"
print(len(list(itertools.permutations(conds))))   # 24 complete orders

offsets = [0, 1, 3, 2]   # Williams first row for k = 4
rows = ["".join(conds[(x + i) % 4] for x in offsets) for i in range(4)]
print(rows)              # ['ABDC', 'BCAD', 'CDBA', 'DACB']
pairs = {(r[j], r[j+1]) for r in rows for j in range(3)}
print(len(pairs))        # 12 distinct ordered pairs = fully balanced

The offset row 0, 1, k−1, 2, k−2, … works for even k; for odd k, use two squares as noted above. Experiment software such as Inquisit can also assign sequences automatically.

FAQ

What is the difference between counterbalancing and randomization?

Counterbalancing enforces equal frequencies of each order or position within the sample. Random ordering gives equal frequencies only on average, so a small sample can be unbalanced. See random assignment vs random sampling for a related distinction.

Is counterbalancing used in between-subjects designs?

Not for condition order, because each participant sees one condition. It can still be used for the order of stimuli or tasks that every participant completes.

What are order effects?

Changes in responses caused by position in a sequence rather than by the condition: practice (improvement) and fatigue (decline) are the two the SJSU handout names. Question order in surveys is one applied case, covered in question order effects.

When is partial counterbalancing enough?

When the number of complete orders (k!) is too large to fill and each condition needs to appear equally often in each position. If carryover is a concern, choose a design that also balances which condition follows which.

Sources

  • Kim, B. G., & Stein, H. H. (2009). A spreadsheet program for making a balanced Latin Square design. Revista Colombiana de Ciencias Pecuarias, 22(4). revistas.udea.edu.co (read 2026-11-07).
  • Van Selst, M. PSYC 120 handout on Latin squares and counterbalancing, San José State University. gcp-web.sjsu.edu (read 2026-11-07).
  • Williams, E. J. (1949). Experimental designs balanced for the estimation of residual effects of treatments. Australian Journal of Scientific Research (original source of the balanced design; cited as reference).

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about Counterbalancing in Research: Definition, Examples and Latin Squares

2 free questions a day, no account.

An AI assistant for research: funder rules, compliance, methods and publishing. It links the sources behind its answers and labels answers that come from a web search.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays open to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →