The short answer: you do not start over. Habit formation is cumulative, not consecutive, and the research finds that missing one opportunity does not materially set it back. The real risk is the next few days — a single lapse that gets read as total failure is how people abandon things that were working.
So: log the miss honestly, do not try to compensate tomorrow, and do not miss twice in a row.
If you are reading this on the evening you broke a run you were proud of, start here: the sixty days before today happened. They are not undone. Nothing about how your brain learned that behaviour was erased at midnight.
What was erased is a number in an app.
What the evidence actually says
The most useful study on this followed ninety-six people picking a daily behaviour and repeating it for twelve weeks, measuring how automatic it felt over time.
Lally, van Jaarsveld, Potts & Wardle (2010), How are habits formed: Modelling habit formation in the real world, European Journal of Social Psychology 40(6), 998–1009. Automaticity took a median of 66 days, with an enormous range of 18 to 254 days depending on the person and the behaviour. Missing a single opportunity to perform the behaviour did not materially affect the habit-formation process.
Two things worth taking from that. The first is the direct answer to your question: one miss is close to noise.
The second is the range. Eighteen to two hundred and fifty-four days. The comfortable “twenty-one days to form a habit” line has no support here, and if you have been treating three weeks as the finish line, a missed day on day nineteen will feel far more significant than it is.
The thing that actually does the damage
Missing once is cheap. Concluding that you have blown it is expensive.
The lapse is small. The reaction is what ends things.
Researchers studying dieting named this pattern decades ago — Janet Polivy and C. Peter Herman found that once someone believed they had broken their rule for the day, the rule stopped constraining them at all, and the small violation became a large one. It has been called the what-the-hell effect ever since, and anyone who has abandoned a habit knows the shape of it without needing the citation.
Notice what a streak counter does at exactly this moment. You miss one day, and the app confirms your worst reading of it by showing a zero. It takes the most dangerous interpretation available — it is all gone — and renders it in large type. That is not neutral feedback. That is the tracker actively making the failure mode worse.
What to do tomorrow
Log the miss. Do not hide it.
The instinct is to backfill, or to quietly not open the app. Resist both. A record you have edited to look better is a record that cannot tell you anything, and the only reason to keep one is that you can trust what it says. If you genuinely did the thing and forgot to log it, correct it. If you did not do it, let it stand.
Do not try to make up for it.
Doubling tomorrow is compensation, and compensation is a symptom of treating the habit as a debt. There is no debt. Do the normal amount.
Do not miss twice.
This is the one rule worth keeping from streak thinking, minus the punishment. One miss is an event. Two consecutive misses is the start of a pattern, because the cue stops recurring and the behaviour loses the context that was carrying it. Aim your effort at tomorrow rather than at your feelings about yesterday.
Then look at the month, not the day.
One miss in thirty is a 97% month. If your tracker cannot show you that — if it can only show you a zero — the tracker is the thing to change.
A measure that does not punish you for one bad day
All of the above is easier with a number that behaves sensibly under a lapse.
Count two things instead of one: how many opportunities you had, and how many you took. The headline figure becomes actions divided by opportunities — an action rate. A single miss moves it a percentage point or two. There is no zero to hit, so there is nothing to protect, so there is no moment where the sensible move is to give up because it is already ruined.
It also handles the case a streak cannot: the day when no opportunity came up at all. That day is not a failure and it is not a success. It is a day nothing happened, and your rate should be unchanged — which is exactly what it does.
Why streaks are built the way they are, and what they cost, is covered in more detail here.