DEV Community

Alfred Chaos
Alfred Chaos

Posted on AI-assisted

Why my period tracker predicts a window, not a single day

A period tracker that tells you "your next period starts March 14" is lying to you.

Not maliciously — just mathematically. Cycle length varies. For most people it bounces around by a few days each month, and the apps that print one confident little date are quietly averaging that variance out and hoping you won't notice when they're off by four days.

When I built my own tracker — Mori, a free, no-account, offline Android app — the prediction design was the thing I spent the most time arguing with myself about. Here's where I landed.

Windows, not dates

Mori's home screen shows a range, like "expected between day 27 and day 31." The midpoint isn't hidden — it's just not presented as a promise.

This turned out to be mostly a presentation problem, not a math problem. The underlying estimate is the same either way; the difference is whether you show the error bars. Showing them costs you the marketing screenshot where the app looks psychic. I decided that was a screenshot worth losing.

The inputs are boring, on purpose

The estimate runs on your own recorded history and nothing else. No crowd data, no model trained on other people's bodies. A handful of your recent actual cycles is the whole training set, and the "model" is simple statistics over them — plain arithmetic you could verify with a calculator.

With little history there's an honest problem: one recorded cycle is barely evidence of anything. So Mori just says so. If you skip the optional "average cycle length" field during setup and log nothing, the app shows "not enough data" instead of guessing. Every prediction carries a confidence label for the same reason — a stable history produces a tight, confident window; a volatile one produces a wider, lower-confidence estimate rather than fake precision.

Unusual records keep the record, lose the confidence

One design rule I'm proud of: the app never silently "fixes" your data. If you log something odd — a very short gap between periods, an unusually long cycle — the record stays exactly as you entered it. What changes is the prediction's confidence, which drops, plus a gentle note. The app treats weird entries as real things that happen, not as corruption to be rejected. The only hard blocks are for inputs that can't actually be stored.

What this means in practice

The fertile-window estimate works the same way: it's labeled as an estimate with uncertainty, never as a clinical result — and it's explicitly not a contraception method. That's a line I don't let the UI blur.

None of this needs a server, which is the part I like most. The whole prediction pipeline — history, statistics, window, confidence — runs on the phone, offline. There's no account, so there's nothing to sync by default. When your period arrives a few days off the window, the app wasn't "wrong"; the window was the honest answer all along. Once that clicked for me, I couldn't go back to apps that pretend otherwise.

Top comments (0)