The SM-2 Algorithm: How Spaced Repetition Works Under the Hood

Every time Repetit decides to show you a card tomorrow instead of next week, SM-2 made that call. Here's exactly how the algorithm works — the formulas, the variables, and the logic that turns simple ratings into long-term memory.

SM-2 algorithm diagram — intervals, ease factor, and review cycle

SM-2: the algorithm that launched a thousand apps

In 1987, Polish researcher Piotr Wozniak was trying to solve a specific problem: how do you memorize large volumes of information — vocabulary, facts, formulas — without forgetting them weeks later? His answer was a computer program called SuperMemo, and the algorithm powering it was SM-2.

SM-2 wasn't the first spaced repetition algorithm Wozniak wrote, but it was the one that worked well enough to publish and share. It has since become the de facto foundation for virtually every flashcard app in existence — Anki, Duolingo's early vocabulary engine, and dozens of others all trace their scheduling logic back to SM-2.

The original algorithm is public domain. Wozniak published it in 1990 in the journal Computers & Education. What follows is a plain-English breakdown of exactly how it works.

Three variables that control everything

SM-2 tracks three numbers per card. Together, they determine when you'll see that card next.
n

Repetition number

The count of successful reviews in a row. Starts at 0 for a new card. Resets to 0 whenever you fail a review (rating below 3). Controls which formula is used for the first two reviews.

EF

Ease Factor

A per-card multiplier, starting at 2.5. After each review it's adjusted based on your rating. High EF = intervals grow fast. Low EF = intervals grow slowly. Minimum value is clamped at 1.3 to prevent cards from becoming daily.

I

Interval

Days until the next review. Starts at 1, then 6, then multiplies by EF on every subsequent successful review. A card with EF 2.5 and current interval 10 days will next be shown in 25 days.

The quality rating: 0 to 5

After every card flip, you rate your recall. This single number drives the entire calculation.
Rating What it means Effect on interval Effect on EF
0 Complete blackout — no recall at all Reset to 1 day EF decreases significantly
1 Incorrect, but the answer felt familiar Reset to 1 day EF decreases
2 Incorrect, but recalled with a hint Reset to 1 day EF decreases slightly
3 Correct, but needed significant effort Interval advances (no reset) EF stays the same
4 Correct after brief hesitation Interval advances normally EF increases slightly
5 Perfect recall, immediate and confident Interval advances maximally EF increases most

ℹ️ Ratings 0–2 are "failures" — the card resets. Ratings 3–5 are "successes" — the interval grows. The difference between 4 and 5 affects how quickly your ease factor climbs.

Exactly how SM-2 calculates each interval

Three simple rules. Applied in order on every successful review.
1

First review (n = 1)

After the very first successful review, the interval is always set to 1 day. You'll see the card again tomorrow, regardless of your rating.

Interval formula — repetition 1
if n == 1: I = 1
2

Second review (n = 2)

After the second successful review, the interval jumps to 6 days. This fixed value gives the card time to settle before the EF multiplier takes over.

Interval formula — repetition 2
if n == 2: I = 6
3

All subsequent reviews (n ≥ 3)

From the third review onward, the interval is multiplied by the card's ease factor. This is where the exponential growth kicks in — and why a well-known card eventually requires only one review per month or year.

Interval formula — repetition n ≥ 3
if n >= 3: I = Iprev × EF

/* Example: interval was 6, EF is 2.5 → next interval = 15 days */
/* Next: 15 × 2.5 = 37.5 → rounded to 38 days */
4

Ease factor update (after every review)

After each review, EF is recalculated based on your rating (q). The formula penalises low ratings and rewards high ones. The floor of 1.3 prevents EF from dropping so low that a card would need daily review forever.

EF update formula
EF = EF + (0.1 − (5 − q) × (0.08 + (5 − q) × 0.02))

/* q = quality rating (0–5) */
/* EF minimum is clamped to 1.3 */
5

Failed review (rating 0–2) — interval reset

Any rating below 3 is a failure. The card's repetition counter resets to 0, the interval resets to 1 day, and the ease factor takes a hit. The card re-enters the schedule from the beginning.

On failure (q < 3)
n = 0 /* reset repetition count */
I = 1 /* review tomorrow */
EF = max(1.3, EF + (0.1 − (5 − q) × (0.08 + (5 − q) × 0.02)))

A single card's lifecycle: from new to long-term memory

Follow one card through six reviews. EF starts at 2.5, ratings are realistic — mostly good with one near-miss.
Card review trace — intervals in days
New
Day 0
Added
+1 day
R1
Day 1
Rating: 4
+6 days
R2
Day 7
Rating: 5
+16 days
R3
Day 23
Rating: 3
+16 days
R4
Day 39
Rating: 4
+41 days
R5
Day 80
Rating: 5
Review Day Rating (q) EF before EF after Next interval Next review
1st 1 4 2.50 2.50 6 days Day 7
2nd 7 5 2.50 2.60 6 × 2.60 ≈ 16 days Day 23
3rd 23 3 2.60 2.46 16 × 2.46 ≈ 39 days Day 62
4th 62 4 2.46 2.46 39 × 2.46 ≈ 96 days Day 158
5th 158 5 2.46 2.56 96 × 2.56 ≈ 246 days ~Day 404

Five successful reviews over 158 days, and this card now doesn't need another look for 8 months. The one near-miss on review 3 (rating: 3) slowed the EF slightly — if it had been a 5, the 5th interval would be closer to 300 days.

How intervals grow at different ease factors

The same card reviewed with consistently different ratings ends up on dramatically different schedules. This table shows cumulative interval in days across 7 successful reviews.
Review # EF 1.3 (always rating 3) EF 2.0 (mostly rating 4) EF 2.5 (default) EF 3.0+ (always rating 5)
1st 1 day 1 day 1 day 1 day
2nd 6 days 6 days 6 days 6 days
3rd 8 days 12 days 15 days 18 days
4th 10 days 24 days 38 days 54 days
5th 13 days 48 days 95 days 162 days
6th 17 days 96 days 238 days 486 days
7th 22 days 192 days 595 days ~4 years

ℹ️ A card you always rate 5 needs only 7 reviews to stay in memory for 4+ years. A card you always rate 3 (barely passing) needs constant re-review and never builds toward long-term retention. Honest ratings matter.

Three practical implications of SM-2

🎯

Rate honestly, not optimistically

The temptation to hit "easy" on a card you kind of remembered is real. But inflating ratings pushes a weak card into a long interval too fast — and you'll fail it weeks later when it resurfaces. Rate what you actually experienced, not what you wish you had.

✂️

Card size directly affects ease factor

Cards with too much information get consistently rated 3 or lower — not because you don't know the material, but because retrieving five facts at once is hard. Splitting complex cards into atomic single-fact cards leads to higher ratings, faster EF growth, and less daily review load.

📉

A low EF is a signal, not a punishment

If a card's ease factor keeps dropping toward 1.3, the algorithm is telling you: this card needs more work. The right response isn't frustration — it's reconsidering the card. Rewrite it, split it, add a mnemonic or image, change the question angle. Fix the card, not just the rating.

Common SM-2 mistakes that slow your progress

⚠️

Rating 5 on every card

Inflating ratings pushes cards into intervals you can't sustain. They resurface weeks later as surprises you've actually forgotten. Let ratings reflect reality.

⚠️

Skipping reviews for days

SM-2 assumes you review on the scheduled day. Missing days shifts all due cards into a pile — and reviewing a card 5 days past its due date weakens the interval calculation. Daily consistency is the key input.

⚠️

Adding too many cards at once

50 new cards today means 50+ reviews in 1 day, 50+ in 6 days, 50+ in two weeks — all at once. New cards compound. Add 10–20 per day max and let the schedule breathe.

⚠️

Complex cards with multiple answers

One card, one fact. If you have to remember three things to flip a card, SM-2 has no way to distinguish which part you actually forgot. Split it. The algorithm works best on atomic knowledge.

How SM-2 compares to newer algorithms

SM-2 is nearly 40 years old, and the field has moved on. Newer algorithms — including SM-18 (SuperMemo's current version), FSRS (Free Spaced Repetition Scheduler), and proprietary systems used by Duolingo — incorporate more variables, machine learning components, and more nuanced models of memory.

FSRS in particular has been shown to outperform SM-2 on retention benchmarks — it models memory stability and retrievability as continuous variables rather than the simple EF multiplier. Anki introduced FSRS as an optional scheduler in 2023.

That said, SM-2's simplicity is also its durability. It works extremely well for the vast majority of learners, is transparent (you can understand exactly why a card was scheduled), and requires no training data. For everyday use — vocabulary, exams, professional terms — the difference between SM-2 and FSRS is smaller than the difference between doing spaced repetition at all versus not doing it.

Algorithm Year Core mechanism Transparency Best for
SM-2 1987 Ease factor × interval High — fully formulaic General use, beginners
SM-18 ~2020 Multi-variable, forgetting index Medium — complex internals SuperMemo power users
FSRS 2022 Memory stability model, ML-fitted Medium — open source High-volume Anki users
Leitner Box 1970s Physical box tiers, manual High — fully manual Paper flashcard systems

FAQ: the SM-2 algorithm

What is SM-2?

SM-2 is the second spaced repetition algorithm developed by Piotr Wozniak for SuperMemo in 1987. It calculates the optimal review interval for each flashcard based on three variables: a repetition counter (n), an ease factor (EF), and the current interval (I). It was published publicly in 1990 and has since become the foundation for nearly every flashcard app.

What is an ease factor?

The ease factor (EF) is a per-card multiplier that controls how fast that card's intervals grow. It starts at 2.5 for every new card. High ratings (4–5) nudge it up; low ratings (0–3) bring it down. A card with EF 2.5 and a current 10-day interval will next be reviewed in 25 days. A card with EF 1.5 would only grow to 15 days. The minimum is clamped at 1.3.

Why does SM-2 use fixed intervals of 1 and 6 for the first two reviews?

The 1-day and 6-day fixed intervals are a deliberate bootstrapping mechanism. When a card is brand new, there's no review history for the algorithm to work with. The fixed intervals ensure every new card gets at least two practice sessions before the multiplier logic takes over. Wozniak's research showed these specific values worked well empirically.

Does Repetit use the exact SM-2 algorithm?

Repetit's scheduling is inspired by SM-2 and uses the same core logic — expanding intervals based on recall quality — with some adjustments for the app's simplified rating scale (Easy / Hard instead of 0–5). The 1 → 3 → 7 → 14 → 30 day base progression is adapted from SM-2's core mechanics to work intuitively for everyday learners.

Do I need to know SM-2 to use Repetit effectively?

Not at all. The algorithm runs silently in the background. All you need to do is review the cards Repetit shows you and rate them honestly. Understanding SM-2 just helps you see why honest ratings matter and why some cards appear more frequently than others.

Try spaced repetition — the algorithm does the scheduling for you

Create a collection, add your first cards, and let Repetit handle the intervals. You just review what's shown each day. Free plan available — no credit card needed.