The Mathematics of Spaced Repetition: Analyzing SuperMemo's SM-2 Algorithm
A mathematical and algorithmic breakdown of the SM-2 spaced repetition scheduler, detailing interval calculations, ease factors, and card decay rates.
Memory is a biological decay function. When we learn a new fact, our ability to recall it declines exponentially over time—a phenomenon mapped by Hermann Ebbinghaus as the Forgetting Curve.
To counteract this decay, we must review information at strategic moments. If we review too early, we waste time; if we review too late, we forget the fact entirely and must relearn it from scratch. The optimal moment to review is right when we are about to forget.
This is the principle behind Spaced Repetition Systems (SRS). While various schedulers exist, the foundation of modern SRS applications (such as Anki) is the SM-2 Algorithm, developed by Polish researcher Piotr Woźniak in the late 1980s.
This guide breaks down the mathematics, variables, and recurrence relations that drive the SM-2 algorithm.
1. The Core Variables of SM-2
To calculate when a user should next see a flashcard, the SM-2 algorithm tracks three variables for every card:
- Repetition Count ($n$): The number of consecutive successful times the card has been recalled.
- Ease Factor ($EF$): A floating-point number representing how “easy” the card is. It dictates how quickly the interval expands. The default initial value is $2.5$.
- Interval ($I$): The length of time (in days) to wait before showing the card to the user again.
2. The Feedback Score ($q$)
Every time a card is presented, the user rates their recall quality on a 0-to-5 scale ($q$):
- 5: Perfect response (no hesitation).
- 4: Correct response after hesitation.
- 3: Correct response recalled with serious difficulty.
- 2: Incorrect response; where the correct one seemed easy to recall.
- 1: Incorrect response; the correct one remembered upon display.
- 0: Complete blackout (never heard of the card).
A score of $q \ge 3$ is considered a successful recall. Any score $q < 3$ is a failure, indicating the card must be placed back into the learning loop.
3. The Recurrence Relations of SM-2
When a user submits a feedback score $q$, the algorithm updates the card’s variables using three mathematical steps.
Step 1: Calculating the Ease Factor ($EF$)
The Ease Factor is updated based on the score $q$:
$$EF’ = EF + (0.1 - (5 - q) \times (0.08 + (5 - q) \times 0.02))$$
If a card is graded highly ($q=5$), the Ease Factor increases, indicating the intervals should expand faster. If graded poorly (score is less than 4), the Ease Factor decreases, meaning the card will appear more frequently.
The Ease Factor is strictly capped at a minimum value of $1.3$. This prevents cards from getting trapped in an infinite loop of daily repetitions.
Step 2: Calculating the Next Interval ($I$)
The next interval (in days) is calculated using a piecewise recurrence relation based on the repetition count $n$:
- First Repetition ($n=1$): $I(1) = 1$
- Second Repetition ($n=2$): $I(2) = 6$
- Subsequent Repetitions ($n > 2$): $I(n) = I(n-1) \times EF$
graph TD
A[Repetition Count n] --> B{Check n value}
B -- n = 1 --> C[I = 1 Day]
B -- n = 2 --> D[I = 6 Days]
B -- n > 2 --> E[I = Previous I * EF]
style E fill:#f9f,stroke:#333,stroke-width:2px
- First Repetition ($n=1$): The card is scheduled for the next day.
- Second Repetition ($n=2$): The interval expands to 6 days.
- Subsequent Repetitions ($n > 2$): The new interval is the previous interval multiplied by the current Ease Factor.
Step 3: Handling Failures ($q$ score is less than 3)
If the user fails to recall the card ($q$ score is less than 3):
- The repetition count $n$ is reset to $0$.
- The interval $I$ is reset to $1$ day.
- The Ease Factor ($EF$) is updated, but is not allowed to drop below $1.3$.
This forces the card back to the beginning of the learning queue, ensuring it is thoroughly reviewed.
4. Limitations and Modern Evolutions (FSRS)
While SM-2 remains highly popular, it has mathematical limitations:
- Rigid Initial Intervals: The first two intervals (1 day and 6 days) are hardcoded, regardless of whether a card is extremely easy or extremely difficult.
- No Memory State Tracking: SM-2 does not explicitly separate retrievability (the probability of recalling a card today) from stability (how deeply rooted the memory is in long-term storage).
To address these limitations, modern applications are transitioning to the Free Spaced Repetition Scheduler (FSRS), an open-source algorithm based on the DSR (Difficulty, Stability, Retrievability) model, using machine learning to fit parameters to individual user review histories.
Key Takeaways
- Exponential Expansion: Successful recalls expand intervals exponentially by multiplying the previous wait time by the card’s Ease Factor.
- Cap Ease Factor: Always cap the Ease Factor at $1.3$ to prevent cards from scheduling at a frequency that leads to review fatigue.
- Reset on Fail: When a recall score drops below $3$, reset the repetition sequence to verify the card’s foundation before expanding intervals again.
Related Inquiries
References & Sources
Cite This Work
APA: Dr. Evelyn Vance. (2026). The Mathematics of Spaced Repetition: Analyzing SuperMemo's SM-2 Algorithm. WiseDesk. Retrieved from https://wisedesk.in/posts/spaced-repetition-supermemo-sm2-algorithm/
MLA: Vance, Evelyn, Dr.. "The Mathematics of Spaced Repetition: Analyzing SuperMemo's SM-2 Algorithm." WiseDesk, 2026, https://wisedesk.in/posts/spaced-repetition-supermemo-sm2-algorithm/.
Enjoyed this analysis?
Join our weekly newsletter to get editorial updates on decentralized networks, technology structures, and design aesthetics direct to your inbox.
Discussion (0)
Comments are currently closed. Enter your email to receive notice when discussion threads open for public critiques.
Related Articles
Learning Retention: Statistical Spaced Repetition Memory Models
A cognitive systems audit of spaced repetition memory models, analyzing the mathematical SuperMemo SM-2 algorithm and memory consolidation statistics.
Mnemonic Devices: The Science of the Method of Loci
A cognitive neuroscience review of mnemonic devices, evaluating the Method of Loci (Memory Palaces), spatial mapping, and memory consolidation.
The Leitner System: A Practical Model for Spaced Repetition
A technical review of the Leitner System, evaluating card queue box progressions, memory consolidation dynamics, and study schedule optimization.