Study Randomizer

Assign subjects to groups, balance by covariates, and generate Latin squares. Fully auditable and reproducible — data never leaves your browser.

Group AssignmentCovariate BalancingAudit Trail

Group Randomizer

Paste subject IDs (one per line) or enter a count. Add a weight column (tab-separated) to balance groups by body weight.

Try it out

Load example study randomizer data to see the full workflow

Group Labels

Latin Square Generator

Enter condition names (one per line) or a number of conditions. Balanced squares control for carry-over effects in within-subjects designs.

  • Assign animals to treatment groups with balanced body weight or other covariates
  • Generate Latin square designs for crossover studies
  • Create stratified randomization schemes for multi-site trials
  • Produce audit-trail documentation for IACUC/IRB protocols
  • Reproducible randomization with seedable PRNG

Don't use for

  • Adaptive randomization (response-adaptive designs)
  • Randomization of very large populations (>1000 subjects)
  • Blinding code management (this creates the allocation, not the blind)

Why Randomize Study Groups?

Randomization is the gold standard for eliminating selection bias in experimental research. Without it, confounding variables — known and unknown — can systematically differ between groups, making it impossible to attribute outcomes to the treatment.

In animal studies, randomization is particularly important because researchers often select animals from the same breeding colony. Subtle differences in cage position, handling order, or weight can bias results if not properly controlled.

Simple randomization assigns each subject to a group with equal probability. Covariate-balanced randomization goes further — it ensures that measurable confounders (like body weight) are evenly distributed across groups.

How the Algorithms Work

The Group Randomizer uses a Fisher-Yates shuffle powered by a seedable PRNG (mulberry32). For simple randomization, subjects are shuffled once and dealt round-robin into groups.

For covariate-balanced randomization, the tool performs 1,000 Monte Carlo iterations — each time shuffling the subjects, dealing them into groups, and computing the maximum pairwise mean difference in body weight. The allocation with the smallest difference wins.

The Latin Square Generator creates either standard or balanced (Bradley, 1958) Latin squares. Standard squares ensure each condition appears once per row and column. Balanced squares additionally control for first-order carry-over effects — critical for crossover and within-subjects designs.

All algorithms are deterministic. The same seed + inputs always produce the same output. This is the foundation of the audit trail — any reviewer can independently verify your randomization.

Frequently Asked Questions