Open the app

How FSRS Works: The Spaced Repetition Algorithm Explained

How FSRS Works: The Spaced Repetition Algorithm Explained

FSRS (Free Spaced Repetition Scheduler) is an open-source algorithm that decides when you should see a flashcard again. It keeps three numbers for every card, predicts the probability that you still remember it, and schedules the review for the day that probability drops to a target you choose. Its 21 parameters are fitted to real review history with machine learning. Anki has offered it since version 23.10, and in 2026 we trained it on our own learners' reviews and put it to the test against the SM-2 scheduler we had used since 2019. This article explains how FSRS works, how it's trained, and what happened when we did it.

Contents

The problem a scheduler solves

Review a card too early and you waste time on something you still know. Review it too late and you've forgotten it, so you start again. The best moment is in between, and it moves: the better you know something, the longer you can wait.

That's the spacing effect, one of the best-replicated findings in memory research. A meta-analysis of 317 experiments found that spreading practice out beats cramming, and that the best gap grows with how long you need to remember (Cepeda et al., 2006). A follow-up with more than 1,350 people put numbers on it: for a test a week away, the best gap was 20 to 40% of that week; for a test a year away, 5 to 10% of the year (Cepeda et al., 2008). A spaced repetition scheduler tries to find that moment for every card, for every learner. For the history behind it, see our piece on the forgetting curve.

SM-2 in one minute

The algorithm most flashcard apps grew up on is SM-2, published by Piotr Woźniak for SuperMemo in December 1987 (SuperMemo):

I(1)=1I(2)=6I(n)=I(n−1)·EF

EF′=EF+0.1−d(0.08+0.02d)d=5−q

EF≥1.3EF0=2.5

q is your grade from 0 to 5; below 3 the card starts again from I(1). Intervals are in days.

Every card carries an ease factor (EF). Each review multiplies the interval by it, and your grade nudges it up or down. It's simple, hard to break, and it lasted 35 years.

Its blind spot is that SM-2 never says how likely you are to remember a card. It only says when to show it. Without a probability you can't measure whether the schedule is right, you can't tune it to a target, and you can't learn its numbers from data: 2.5, 1.3 and the 6-day second step are the same for everyone.

Our own scheduler belongs to the SM-2 family, with two documented changes: the ease factor is clamped between 1.3 and 2.5, and it still changes after a failed answer, because our listening mode uses it to bring your hardest sentences forward.

The memory model: difficulty, stability, retrievability

FSRS describes each card with three numbers, an idea it inherits from SuperMemo's later algorithms and from the DHP model used by the Chinese app MaiMemo (FSRS wiki):

  • Retrievability (R): the probability you can recall the card right now.
  • Stability (S): the number of days it takes for R to fall from 100% to 90%. A card with S = 10 is 90% likely to be remembered 10 days after a review.
  • Difficulty (D): how hard the card is for you, from 1 to 10. It controls how fast stability grows.

Between reviews, R falls along a forgetting curve. FSRS-6 uses a power curve whose shape is itself one of the trained parameters, w20:

R(t,S)=(1+factor·tS)−w20factor=0.9−1/w20−1R(S,S)=0.9

Three forgetting curves for a memory with stability 10 days: FSRS-6 with its default decay, FSRS fitted on our learners, and an exponential curve that falls much faster

Why a power curve and not the exponential one textbooks draw? Because a card's history mixes memories of different strength, and averaging exponential curves with different speeds gives a curve that drops fast at first and then flattens. That's what the data shows. On our learners' data the fitted curve is flatter still (w20 = 0.102 against the default 0.154): after the first weeks, our learners forget more slowly than the average Anki user.

From memory to a date: desired retention

FSRS asks you one question: what probability of recall do you want at review time? That's desired retention. Invert the curve and you get the interval:

I(r,S)=Sfactor(r−1/w20−1)I(0.9,S)=S

For a card with S = 10 days and the default curve, computed from the formula above, the choice matters a lot:

Desired retention Next review in
80% 33 days
85% 19 days
90% 10 days
95% 4 days
97% about 2 days

Asking for 95% instead of 90% more than doubles your reviews for this card. Anki's manual warns that above 90% "the workload increases very quickly" (Anki manual). Anki used to offer a "minimum recommended retention" calculator; since version 25.07 a workload simulator replaces it.

What happens after each review

After every review FSRS updates difficulty and stability. Three effects shape how much stability grows after a successful review: the easier the card, the more it grows; the more stable it already is, the less it grows; and the closer you were to forgetting, the more it grows. That last one is the spacing effect, built into the formula.

After a successful review (Hard, Good or Easy):

S′=S·(1+A)A=ew8(11−D)S−w9(ew10(1−R)−1)hb

where h = w15 for Hard (otherwise 1) and b = w16 for Easy (otherwise 1).

After a lapse (Again):

S′=min(F, Sew17w18)F=w11D−w12((S+1)w13−1)ew14(1−R)

Difficulty, for grade G = 1 (Again) to 4 (Easy):

ΔD=−w6(G−3)D′=D+ΔD·10−D9D′′=w7D0(4)+(1−w7)D′

A worked example with the FSRS-6 default parameters at 90% retention, a card answered Good every time, computed with py-fsrs 6.3.1:

Review Stability after it Next review in SM-2 (our variant)
1 2.3 days 2 days 1 day
2 11.0 days 11 days 6 days
3 46.3 days 46 days 15 days
4 162.9 days 163 days 38 days
5 497 days 497 days 94 days

Now forget it once. Answer Good twice, then Again at day 11: stability falls from 11 days to 1.5, difficulty jumps from 2.1 to 7.4, and the card climbs back more slowly (2, 5, 12, 28 days). SM-2 would reset the interval to one day, with no idea how much of the memory survived.

A detail the official description leaves out: in the reference code, stability after a lapse is capped slightly below the stability before it, and a same-day review never lowers stability if you answered Hard or better (fsrs-rs).

The 21 parameters

FSRS-6 has 21 weights, w0 to w20. You don't need to know them to use it, but this is all the model is (FSRS wiki, fsrs-rs bounds):

Weights Default What they control
w0–w3 0.212, 1.293, 2.307, 8.296 Stability in days after the first answer: Again, Hard, Good, Easy
w4, w5 6.413, 0.833 Starting difficulty and how fast it falls with a better first answer
w6, w7 3.019, 0.001 How much each answer moves difficulty, and the pull back to the start
w8–w10 1.872, 0.167, 0.796 Stability growth after success: overall size, slowdown for stable cards, bonus for reviewing close to forgetting
w11–w14 1.484, 0.061, 0.263, 1.648 Stability after a lapse
w15, w16 0.601, 1.873 Penalty for Hard, bonus for Easy
w17–w19 0.543, 0.091, 0.066 Reviews on the same day
w20 0.154 Shape of the forgetting curve

How FSRS is trained: the machine learning part

FSRS is a small model with 21 numbers, and those numbers are learned from data. Here's how.

The data is the review log: for each review, which card, when, and which button you pressed. Nothing about the content of the card goes in.

The prediction. Walk through each card's history in order. Before each review, the model computes R, the probability you'll recall it after the time that has passed. Then it sees what you actually did.

The loss is log loss (binary cross-entropy): a confident wrong prediction costs a lot, a cautious one costs little. Training looks for the 21 numbers that make the whole history least surprising.

The optimiser is gradient descent. Because each prediction depends on the card's previous reviews, the error is pushed back through the whole sequence, like training a recurrent neural network. In Anki's Rust implementation that means Adam with a learning rate of 0.04, 5 passes over the data, batches of 512 reviews, a penalty for straying far from the defaults, and clamping every weight to an allowed range after each step (fsrs-rs training). The four starting stabilities are estimated first, from how often first answers were remembered.

How much data? Anki's manual says you need at least "a few hundred" reviews and that re-training once a month is enough. The default parameters themselves were fitted on several hundred million reviews from about 10,000 Anki users (FSRS wiki).

That's machine learning in the plain sense: parameters estimated from data by minimising a loss. It isn't a black box. You can print the 21 numbers and check what each one does.

Does it work? Reading the benchmark

The open srs-benchmark tests schedulers on 9,999 Anki collections, about 350 million reviews. Each model is trained on older reviews and tested on newer ones. Three measures matter:

  • Log loss: how good the probabilities are. Lower is better.
  • RMSE (bins): how far predicted recall is from real recall, in groups of similar reviews. Lower is better.
  • AUC: how well the model ranks the cards you'll forget above the ones you'll remember. 0.5 is a coin toss, higher is better.
Algorithm Log loss RMSE (bins) AUC
FSRS-6 0.346 0.065 0.705
FSRS-6 with default parameters 0.366 0.093 0.696
HLR (Duolingo) 0.469 0.128 0.637
Anki's SM-2 0.616 0.172 0.613
SM-2 0.722 0.203 0.603

Bar charts of log loss and AUC in srs-benchmark: FSRS-6 is best on both, SM-2 worst

These are the August 2025 figures, the last table that still listed SM-2. SM-2 doesn't predict probabilities, so the benchmark converted its intervals into one, and part of its poor log loss measures that conversion. AUC doesn't depend on it, and there SM-2 also comes last. Even FSRS-6 with untrained defaults beats every SM-2 variant. The Duolingo model, Half-Life Regression (Settles & Meeder, 2016), sits in between.

Neural networks (LSTM, GRU, RWKV) predict a little better than FSRS in the current table, with hundreds to millions of parameters. FSRS keeps its place because it's small, explainable and needs little data per person.

How we trained FSRS on our learners' data

Our learners have reviewed sentences with our SM-2 scheduler since 2019. Our records today hold 16,575 learners and 568,000 cards. In 2026 we used that history to train FSRS.

The data. Our detailed review log, with a timestamp for every answer, covers 1.21 million reviews. Each one was scheduled by SM-2, which helps: SM-2 showed cards at many different intervals, so the model sees what was remembered after 2 days, 20 days and 200. A "card" is one learner, one sentence, one language direction. Our app has three answer buttons, which we map to Again, Hard and Good. There's no Easy, so the two Easy weights (w3, w16) stay at their defaults. We dropped automatically graded items, such as info screens that you only read, because they aren't memory tests.

The fit. We used py-fsrs 6.3.1, the Python FSRS package, whose optimiser runs on PyTorch. For every card, the first 80% of its reviews went into training and the last 20% were kept for testing, so nothing from the future leaked into the past. The optimiser learned one set of 21 weights for all our learners.

The test. On 226,710 test reviews FSRS beat our SM-2 on every measure: AUC 0.686 against 0.597, calibration error 0.098 against 0.250, and log loss 0.43 against 0.59 (95% confidence interval of the difference: −0.179 to −0.148). It also beat FSRS with default parameters.

Eight weeks in the shadow. Then FSRS ran on production without showing anyone anything. For every real answer it computed its own schedule next to SM-2's. Over 164,894 answers from 1,482 learners: AUC 0.749 against 0.604 for SM-2, calibration error 0.065 against 0.076. A replay of the full history, 485,160 predictions paired with what learners really did, gave AUC 0.79 and a calibration error of 0.053.

Choosing desired retention. The replay showed something useful: on our data FSRS is slightly pessimistic. At a target of 0.80 our learners actually recalled about 88.5%. We set the target to 0.825, where real recall comes out at about 90%. At that setting FSRS needs about 0.87 times the scheduled reviews of SM-2: the same effort, aimed at the cards that need it.

Our 21 fitted FSRS weights shown as a ratio to the FSRS-6 defaults; the largest changes are in the first-answer stability, the lapse weights and the same-day weights

What the fitted weights say about our learners.

  • A first Good is strong: stability after a first Good is 6.1 days, not 2.3. In our app Good is the top button, so it carries what Good and Easy share in Anki.
  • A first Again is forgotten almost at once (w0 = 0.015 days).
  • After a lapse, our learners restart much lower than the default assumes (w11 = 0.24 against 1.48).
  • Repeats on the same day count for much more (w17, w18). We think that's our drill: cards you get wrong can come back in a drill on the same day.
  • The forgetting curve is flatter (w20 = 0.102).

In practice that makes FSRS bold with well-known cards. With the settings our pilot uses, a new sentence answered Good every time comes back after 1, 36, 212 and 704 days; SM-2 would show it after 1, 6, 15, 38 and 94.

Days until the next review for a card answered Good every time: FSRS-6 defaults, FSRS fitted on our learners as configured in our pilot, and our SM-2

Where it is now. FSRS schedules reviews for part of our learners in a controlled pilot, with a matched group staying on SM-2, and SM-2 remains the default until the results are in. The limits we know about: one set of weights for everyone (not per learner, yet), no Easy answers in the data, and long first intervals that some learners may find too bold.

What's different about learning a language

FSRS assumes two things: each card is a separate memory, and a memory changes only when you review that card. Language learning breaks both, and our content shows how.

  • Sentences, not words. Our cards are whole sentences. One sentence exercises several words and a grammatical structure at once, so recalling it is a richer event than recalling a single word, and success on one sentence helps the next.
  • Verbs. A verb lives in many forms. In our courses a conjugation table for one verb in one tense is a single item you review, next to sentences that use those forms. Practising "I went" helps "they went", but FSRS schedules each card as if it were alone.
  • Grammar points. A grammar point appears as a short explanation with examples, and then across dozens of sentences. Its "memory" is spread over cards that FSRS treats as unrelated.
  • Mini stories. Our short stories link sentences through a plot, and you can read or listen to them outside your reviews. That's practice the review log never sees.
  • Direction and listening. Polish to Norwegian and Norwegian to Polish are two cards but linked memories. Our listening mode plays your sentences in the background, starting with the hardest, which also strengthens memories between reviews.

None of this makes FSRS wrong. It means its predictions are conservative for language, which may be one reason our learners recall more than the model expects. Modelling links between cards is the next open problem, for us and for the field.

What's next: FSRS-7

FSRS keeps moving. FSRS-7 is already in the benchmark: 34 parameters, intervals measured in fractions of a day, and a forgetting curve with 8 parameters of its own. It's the default in the development version of fsrs-rs but hasn't shipped in Anki yet (srs-benchmark).

FAQ

What does FSRS stand for?

Free Spaced Repetition Scheduler. It's open source, developed by the Open Spaced Repetition community led by Jarrett Ye.

Who made FSRS?

Jarrett Ye, building on his research at MaiMemo, published in KDD 2022 and IEEE TKDE 2023 (Ye et al., 2022). It became part of Anki in version 23.10 (October 2023).

Is FSRS better than SM-2?

On prediction, clearly: in the open benchmark its error is about three times lower, and on our own learners' data its AUC was 0.749 against 0.604. Whether that means less work depends on the retention you choose.

How is FSRS trained on my reviews?

It replays your review history card by card, predicts recall before each review, compares the prediction with your answer, and adjusts its 21 weights by gradient descent to reduce the log loss.

What is desired retention?

The probability of recall you want at the moment a card comes back. 90% is the usual default. Higher means more reviews, quickly.

What forgetting curve does FSRS use?

A power curve, R = (1 + factor × t / S)^(−w20), where the decay w20 is trained on your data.

Does Taalhammer use FSRS?

Our default scheduler is an SM-2 variant. FSRS, trained on our learners' reviews, schedules reviews for part of our learners in a controlled pilot.

Further reading

The best technical source is the Open Spaced Repetition wiki, The Algorithm, and Expertium's technical explanation. If you're moving from Anki, see importing from Anki. For how we decide which sentence you see next, read about our n+1 engine.