SM-2 is the 1990 algorithm that still schedules most of the world's flashcards, including Anki's by default and all of ours. It is simple enough to write out in full, so here it is in full — including the exact numbers your child's cards move through.
At a glance
| Concept | What it is |
|---|---|
| Ease factor | A per-card multiplier starting at 2.5. Decides how fast that card's gaps grow |
| Quality grade | How well the recall went, 0–5. We use 2, 4 and 5 |
| Interval | Days until the next review |
| Repetitions | Count of consecutive successful reviews |
| Lapse | A failed review. Resets repetitions, keeps a running count |
| Opening intervals | Fixed: 1 day, then 6 days |
| After that | interval × ease, rounded |
The three moving parts
SM-2 stores three numbers per card, and that is genuinely all:
- Ease factor — starts at 2.5. How generous this particular card's schedule is.
- Interval — the current gap in days.
- Repetitions — how many successful reviews in a row.
Everything else is derived. There is no model of memory here, no curve being fitted. It is a feedback loop: grade a card, nudge its ease, multiply.
Quality grades
The original algorithm takes a quality score from 0 to 5, where anything below 3 counts as a failure. Six options is far too many for a child to use honestly, so like most implementations we collapse them. Ours maps to three:
| Button | Quality | Meaning |
|---|---|---|
| Tricky | 2 | Failed — below the pass line |
| Got it | 4 | Recalled with some effort |
| Too easy | 5 | Recalled immediately |
How the ease factor moves
This is the formula, exactly as SM-2 defines it, where q is the quality:
ease := ease + (0.1 − (5 − q) × (0.08 + (5 − q) × 0.02))
It looks awkward but it is just a curve that rewards easy recalls a little and punishes failures a lot. Substitute our three grades:
| Grade | q | Change to ease |
|---|---|---|
| Too easy | 5 | +0.10 |
| Got it | 4 | 0.00 — exactly neutral |
| Tricky | 2 | −0.32 |
Two things worth noticing.
Got it is neutral by design. Substituting q = 4 gives 0.1 − 1 × (0.08 + 0.02) = 0. A child who presses Got it on everything keeps the default schedule forever. That is the intended behaviour: "I knew it, with effort" is the calibration point, not a reward.
Failure costs more than three successes recover. A single Tricky (−0.32) needs three Too easys (+0.30) to undo. The asymmetry is deliberate — evidence that a card is hard is treated as more informative than evidence that it is easy.
There is also a floor. Ease never falls below 1.3, because below that intervals barely grow and the card would return almost daily forever. A card pinned at the floor is telling you something the scheduler cannot fix, which is why we flag it to the tutor instead.
How the interval is computed
if q < 3: # a failure
repetitions := 0
interval := 0 # relearn: due again tomorrow
else:
repetitions := repetitions + 1
if repetitions == 1: interval := 1
elif repetitions == 2: interval := 6
else: interval := round(interval × ease)
The first two intervals are constants rather than calculations. That is not laziness — a card with one successful review carries almost no evidence about its own difficulty, so multiplying by an ease factor that has barely moved would be false precision. One day, then six days, then start trusting the multiplier.
One detail that trips up people implementing SM-2: the multiplication uses the ease value from before this review's adjustment. Our implementation does the same, which is why the numbers below are what they are.
A full worked trace
Our ceiling is 90 days, so the ladder terminates rather than running away. Starting fresh, pressing Got it every time:
| Review | Ease before | Calculation | New interval | Falls on |
|---|---|---|---|---|
| 1 | 2.5 | fixed | 1 day | day 1 |
| 2 | 2.5 | fixed | 6 days | day 7 |
| 3 | 2.5 | 6 × 2.5 = 15 | 15 days | day 22 |
| 4 | 2.5 | 15 × 2.5 = 37.5 | 38 days | day 60 |
| 5 | 2.5 | 38 × 2.5 = 95 → capped | 90 days | day 150 |
| 6+ | 2.5 | capped | 90 days | each term |
Now the same card pressing Too easy every time. Ease climbs, so the ladder is steeper:
| Review | Ease before | Calculation | New interval |
|---|---|---|---|
| 1 | 2.5 | fixed | 1 day |
| 2 | 2.6 | fixed | 6 days |
| 3 | 2.7 | 6 × 2.7 = 16.2 | 16 days |
| 4 | 2.8 | 16 × 2.8 = 44.8 | 45 days |
| 5 | 2.9 | 45 × 2.9 = 130 → capped | 90 days |
And a Tricky on a fresh card. Ease drops 2.5 → 2.18, repetitions reset, and the rebuilt ladder is permanently gentler:
1 → 6 → 13 → 28 → 61 → 90 (after one Tricky)
1 → 6 → 15 → 38 → 90 (never failed)
That card now visits your child more often for the rest of its life. Nobody had to decide that; it falls out of the arithmetic.
What SM-2 does not know
Being clear about the limits, because they explain why better algorithms exist.
It has no memory model. SM-2 does not estimate the probability you will recall a card tomorrow. It has a multiplier and a rule of thumb. Modern schedulers — SuperMemo's SM-17 onward, and FSRS — model retrievability and stability as separate quantities and predict recall directly. They are meaningfully more accurate.
It cannot learn from other cards, or other people. Every card's ease is discovered from scratch, so a card needs several reviews before its schedule reflects reality. A trained model starts with priors.
It ignores how long you took. Answering instantly and answering after fifteen seconds of struggle both count as Got it.
The constants are arbitrary. Why 1 and 6 days? Why ±0.1? Because they worked in 1990 on a particular collection. They are defensible, well-tested defaults, not derived truths.
Why we still use it
Three reasons, all practical. It is published and exact, so we can show you the real ladder in a table rather than describing a black box. Better models need history — they fit parameters to thousands of reviews, and a child two months in has none. And for a collection of a few hundred cards under a 20-a-day cap, the efficiency gap simply is not the thing standing between a child and a habit; making the cards is.
Our review log was built to be re-fittable, so a better scheduler can be adopted later without losing anything.
FAQ
What is the SM-2 algorithm?
A spaced-repetition scheduler published by Piotr Woźniak in 1990. Each card carries an ease factor; each review multiplies the current interval by that ease to get the next one, and the ease itself moves up or down with how well you recalled it.
What is an ease factor?
A per-card multiplier, starting at 2.5, that decides how fast that card's gaps grow. It rises slightly on an easy recall and falls sharply on a failure, with a floor of 1.3.
Why do the first two intervals not use the ease factor?
They are fixed at 1 day and 6 days. A card with only one successful review carries almost no information about its difficulty, so SM-2 uses a sensible constant rather than a multiplier of nothing.