For most people, stopping chocolate about 4–6 hours before bedtime is a sensible buffer — and for a large serving of dark chocolate, or if you're caffeine-sensitive, closer to 6–8 hours. Milk chocolate and a small square of dark chocolate are much weaker stimulants than coffee, so a modest nibble an hour or two before bed is unlikely to wreck most people's sleep.
How much stimulant is actually in chocolate?
Chocolate contains two related stimulants: caffeine and theobromine (a milder cousin of caffeine found in cocoa). Using USDA figures:
| Food | Caffeine | Theobromine |
|---|---|---|
| Dark chocolate 70–85%, 1 oz (28 g) | ~22 mg | ~225 mg |
| Dark chocolate, per 100 g | 80 mg | 802 mg |
| Milk chocolate, 1 oz (28 g) | ~6 mg | ~57 mg |
| Milk chocolate, per 100 g | 20 mg | 205 mg |
| Homemade hot cocoa, 1 cup (250 g) | ~5 mg | ~170 mg |
| Brewed coffee, 8 fl oz (237 g) | ~95 mg | 0 |
So a 1-ounce square of dark chocolate carries roughly a quarter of the caffeine in a cup of coffee, and milk chocolate far less. Eat a whole 100 g dark bar, though, and you're at 80 mg of caffeine — close to a cup of coffee — plus a hefty 800 mg of theobromine.
Why the 4–6 hour rule of thumb
- Caffeine clears slowly. Its half-life (the time for your body to clear half the dose) averages about 5 hours, but ranges widely — from roughly 2 to 10 hours depending on genetics, liver enzymes, smoking, pregnancy and some medications. Sleep researchers commonly advise cutting caffeine at least 6 hours before bed; controlled studies have shown measurable sleep disruption from 400 mg taken 6 hours before bedtime. That evidence is reasonably solid.
- Theobromine lingers longer but hits softer. Its half-life is around 6–10 hours, yet it is a considerably weaker central nervous system stimulant than caffeine. Small trials have found cocoa or theobromine in the evening can slightly increase nighttime restlessness, but the effect is modest and the research is limited.
- Dose matters more than timing. A 10 g square of dark chocolate (about 8 mg caffeine) is a different proposition from half a bar.
Other reasons chocolate near bedtime can backfire
- Sugar and calories. USDA lists 24 g sugar per 100 g in 70–85% dark chocolate and 52 g per 100 g in milk chocolate. Large sugary snacks late at night can cause blood-sugar swings in some people.
- Reflux. Chocolate is a classic trigger for heartburn — it relaxes the valve at the top of the stomach and is high in fat (43 g per 100 g for dark). If you get reflux, aim to finish eating 2–3 hours before lying down.
- Hot cocoa is the gentlest option: a cup has only about 5 mg caffeine, plus calcium (114 mg per 100 g) and protein.
Practical guidance
- Caffeine-sensitive, poor sleeper, or pregnant: treat dark chocolate like a half-cup of coffee and stop 6–8 hours before bed.
- Average sleeper: a square or two of dark chocolate 3–4 hours before bed is usually fine.
- Craving something at 10 p.m.: choose milk chocolate, a small piece, or cocoa made with milk.
- If you take medications that interact with caffeine (some antibiotics, asthma drugs, certain antidepressants) or have a sleep disorder, it's worth asking your doctor or pharmacist how much leeway you have.