The SM-2 algorithm, explained

SM-2 is the scheduling rule behind Anki and most flashcard apps. It fits on an index card: one number for how easy a card is, one for how long to wait, and a multiplication.

Updated 31 October 2026

Where SM-2 comes from

Piotr Woźniak wrote SM-2 in 1987 for SuperMemo, one of the first spaced repetition programs. Later SuperMemo versions moved on to more complex models, but SM-2 was published, simple and good enough, so it became the default almost everywhere else, Anki included.

The original rules

After each review you grade your answer from 0 (blackout) to 5 (perfect). Every card carries two numbers:

  • The interval, how many days until the next review.
  • The easiness factor (EF), which starts at 2.5 and never drops below 1.3.

Then:

  1. If the grade is below 3, start the card over: the next interval is 1 day.
  2. Otherwise the first interval is 1 day, the second is 6 days, and every later one is the previous interval times EF.
  3. After every review, update EF with EF + (0.1 − (5 − q) × (0.08 + (5 − q) × 0.02)).

That formula looks fussy, but it just nudges the ease up or down by a fixed amount for each grade:

GradeChange to EF
5, perfect+0.10
4, after a pause0
3, with difficulty−0.14
2−0.32
1−0.54
0, blackout−0.80

The Anki-style version

Anki and Ankitti keep the core idea, interval times ease, and change the edges. There are four buttons instead of six grades, and new cards go through short learning steps before they ever get a day-long interval.

ButtonNext intervalEase
AgainBack to the learning steps−0.20
HardInterval × 1.2−0.15
GoodInterval × easeNo change
EasyInterval × ease × 1.3+0.15

Ankitti’s defaults are learning steps of 1 and 10 minutes, a graduating interval of 1 day, an easy interval of 4 days, a starting ease of 2.5, a minimum of 1.3, and a maximum interval of 36,500 days. Each deck can change them.

One card on a good run

Press Good every time and a new card is shown at these gaps:

ReviewNext gapWhy
1st10 minutesSecond learning step
2nd1 dayGraduates
3rd3 days1 × 2.5, rounded
4th8 days3 × 2.5, rounded
5th20 days8 × 2.5
6th50 days20 × 2.5
7th125 days50 × 2.5

Seven reviews carry a fact past four months. Once an interval reaches 21 days the card counts as mature.

What a miss does

Say the card is on a 20-day interval and you press Again. Its ease drops from 2.50 to 2.30 and it goes back through the short steps. When it climbs again, each gap grows by 2.3× instead of 2.5×, so a card you find hard is shown a little more often from then on. That is the whole trick: hard cards earn more reviews, easy cards fade into the background.

The Good button in code

function good(card) {
  const next = Math.round(card.interval * card.ease);
  // never schedule Good sooner than Hard would
  const hard = Math.round(card.interval * 1.2);
  card.interval = Math.min(36500, Math.max(hard + 1, next));
  card.due = Date.now() + card.interval * 86_400_000;
  return card;
}

SM-2 or FSRS?

FSRS is a newer scheduler that fits a memory model to your own review history, and Anki has offered it since version 23.10. Its supporters report fewer reviews for the same recall. SM-2 is simpler and completely predictable: you can work out every interval by hand, as above. For most learners the bigger win is reviewing every day, whichever scheduler you use. New to the idea? Read what spaced repetition is.

Questions

What does the ease factor mean in SM-2?
It is the multiplier between one interval and the next. A card with ease 2.5 waits 2.5 times longer after each successful review. Hard answers lower it, easy answers raise it.
Why is the minimum ease 1.3?
Below about 1.3 intervals grow so slowly that a difficult card would be shown almost daily forever. Woźniak found that such cards are better rewritten than reviewed more.
Why does original SM-2 use 6 days for the second interval?
It was an empirical choice from Woźniak’s own experiments in the 1980s. The Anki-style variant replaces it with learning steps and a graduating interval you can change.