The famous "21 days" comes from a 1960s plastic surgeon's observation about patients adjusting to their new faces, not from habit research. The most-cited actual study, Lally and colleagues at UCL in 2009, followed people building real habits and found automaticity took anywhere from 18 to 254 days, with a median around 66. So the honest answer to your question: roughly two months for something simple, most of a year for something hard, and the exact number depends far more on the habit and your context than on any calendar rule.
Two findings from that study matter more than the headline number. First, missing a single day made almost no measurable difference to the final outcome. The people who failed weren't the ones who missed once, they were the ones who let one miss become a stop. Second, complexity is the biggest lever: drinking a glass of water automated in weeks; fifty sit-ups took months. Pick the smallest version of the habit and your number drops dramatically.
What 'formed' actually means
Researchers don't measure habits by whether you did the thing; they measure automaticity: how little deliberation it takes. A formed habit is one your brain initiates from context (time, place, previous action) instead of from willpower. You don't decide to brush your teeth; the bathroom decides for you. That handover from decision to context is what takes 18-254 days.
This is why the early weeks feel so expensive. Every repetition still costs a decision, and decisions draw from the same budget as everything else in your day. The encouraging part: the curve is steepest at the start. Each early repetition buys more automaticity than the ones after, so the hardest version of the habit is the one you're doing right now.
The three levers that set your number
Simplicity first: halve the habit and you roughly halve the runway. "Journal every night" automates slower than "write one line every night," and the one-liner pulls the longer entries in behind it on the days you have more to say. Second, stability of cue: a habit anchored to something that happens every single day (getting into bed, morning coffee) forms faster than one anchored to "when I have time," which is a cue that fires never.
Third, immediate reward. Habits with a payoff your brain feels today (the checkmark, the streak ticking up, the small pride of a written line) automate faster than ones whose payoff arrives in six months. This isn't a character flaw; it's dopamine doing its job. Borrow it: make the act of recording the habit satisfying and the habit itself inherits the reward.
Survive the boring middle
Somewhere around week three the novelty dies and the results haven't arrived yet: the valley where most habits go to be abandoned quietly. The fix isn't motivation, it's evidence. A visible record of every day you showed up gives the middle weeks something the mirror can't: proof of accumulation. Twenty-six marked days is an argument; a feeling is not.
And when you miss, and you will, the research is on your side. One miss costs you almost nothing. The rule that saves habits is never miss twice: treat the day after a miss as the single most important day of the whole habit, and do the minimum version even if it's laughably small. The streak isn't the point; the identity is, and identity survives a missed Tuesday.
Count days somewhere you can see them
One Percent turns the year into a 365-dot view. One Percent records a short daily highlight and lowlight. The record shows what you entered without claiming that a certain number of dots forms a habit.
One Percent shows daily notes and mood over time. One Percent provides iPhone widgets. You can keep the record visible while treating the habit-formation timeline as a range, not a countdown.
The app behind the dots
One Percent.
One Percent turns the year into a 365-dot view. One Percent records a short daily highlight and lowlight. One Percent shows daily notes and mood over time. One Percent provides iPhone widgets.