Skip to main content
AI Fit Hub

Recovery

Sleep Calculator

Calculate optimal bed and wake times based on 90-minute sleep cycles.

Your numbers

Start from an example

Goal
Time to fall asleep

About 15 minutes is typical.

Result

Optimal bed time
10:45 PM

Five 90-minute cycles: 7 h 30 min asleep, 7 h 45 min in bed.

Bedtimes by number of cycles

9:15 PM6 cycles · 9 h7 h or more
10:45 PM5 cycles · 7 h 30 min7 h or more
12:15 AM4 cycles · 6 hUnder 7 h
1:45 AM3 cycles · 4 h 30 minUnder 7 h

Sleep duration ladder

Hours asleep for each number of cycles. Five or six meet the 7 hours adults need.

3 cycles
1:45 AM → 6:30 AM
4 h 30 min
4 cycles
12:15 AM → 6:30 AM
6 h
5 cycles
10:45 PM → 6:30 AM
7 h 30 min
6 cycles
9:15 PM → 6:30 AM
9 h
0h10h

Education, not medical advice. The result comes only from the published formula and your inputs. How we check our formulas.

How to use it

  1. Enter your required wake time or target bedtime. The calculator outputs optimal sleep start times based on 90-minute sleep cycles — waking mid-cycle (not at cycle end) causes sleep inertia and prolonged morning grogginess.
  2. Target 5–6 complete cycles (7.5–9 hours asleep): adults need 7 hours or more. Four cycles (6 hours) or fewer, night after night, impairs recovery and cognitive performance.
  3. If you sleep the recommended hours but still wake tired, look at sleep quality: alcohol close to bed fragments sleep, reading on a bright screen in the evening suppressed melatonin and delayed the body clock compared with a printed book (Chang 2015), and irregular timing disrupts your rhythm.
  4. Keep your timing consistent as well as your duration: a fixed wake time, even at weekends, anchors your body clock.
  5. During high-intensity training blocks, aim for 8–9 hours. Chronic short sleep adds up: in a laboratory study (Van Dongen et al., 2003), two weeks of 6 hours a night impaired attention about as much as a full night without sleep.

Questions people usually ask

What is a sleep cycle?

A sleep cycle is approximately 90 minutes and includes different stages: light sleep, deep sleep, and REM sleep. Your body naturally completes cycles in roughly 90-minute intervals.

Why does 90 minutes matter?

Waking up at the end of a complete cycle (rather than in the middle) can help you feel more rested. Five or six complete cycles give 7.5 to 9 hours of sleep, inside the 7 to 9 hours recommended for most adults; four cycles (6 hours) fall short.

What do the ratings mean?

Ideal = 5-6 cycles (7.5-9 hours asleep, meeting the 7 hours or more adults need). Short = 3-4 cycles (4.5-6 hours). Aim for ideal when possible, but any complete cycle is better than waking mid-cycle.

How do I account for the time it takes to fall asleep?

This calculator includes a fall-asleep time (default 15 minutes). If you typically fall asleep faster or slower, adjust the slider to match your experience for more accurate results.

Can I use this if I work night shifts?

Yes! The calculator works for any 24-hour time. Just enter when you want to wake or sleep, regardless of whether it's day or night.

Is this medical advice?

No. This tool provides general sleep optimization guidance based on the 90-minute cycle hypothesis. Sleep needs vary by age, health, and lifestyle. Consult a healthcare provider for personalized sleep advice.

Is this tool free and private to use?

Yes. AI Fit Hub tools are free, no-signup browser tools. Inputs stay in your browser unless you choose to share a URL.

  • Nutrition TDEE Calculator

    Estimate your daily energy expenditure with Mifflin-St Jeor + activity factors.

  • Nutrition Macro Calculator

    Convert calorie targets into protein, carbs, and fat grams for your goal.

  • Planning Calorie Deficit Calculator

    Estimate required daily calorie deficit for a target timeline and bodyweight change.

  • Planning Body Recomposition Planner

    Plan body-fat reduction pace, deficit targets, and protein needs around a timeline.

Background on the Sleep Calculator

  • Guide How to Break a Calorie Deficit Plateau (5 Fixes)

    To break a calorie deficit plateau, check five causes before cutting calories: tracking errors, a lower TDEE, water shifts, less movement and short sleep.

  • Alternatives Oura Ring Alternatives (2026)

    Oura Ring alternatives in 2026: the Ultrahuman Ring PRO, WHOOP, and Garmin compared on sleep accuracy, subscription cost, and who each tracker fits.

  • Statistics Sleep Statistics: Performance, Recovery, and Health Data

    Sleep statistics: how many people sleep too little, effects on testosterone, muscle protein synthesis and performance, each figure with its source.

  • Alternatives WHOOP Alternatives (2026)

    WHOOP alternatives in 2026: Oura Ring 5, Garmin, and Apple Watch compared on recovery accuracy, subscription cost, and who each tracker fits.

All resources
All articles

By goal

Use it from an agent or code

Any agent can run this calculator by URL: put the inputs in the query string and get JSON back, with the inputs that used defaults and a line to cite (add format=md for markdown). MCP clients reach it through https://aifithub.io/mcp.

https://aifithub.io/api/run/sleep-calculator?mode=wake-time&wake_time=06%3A30&fall_asleep_minutes=15

In code, import the same module; it runs where you import it, with no request or key.

import { compute } from "https://aifithub.io/engines/sleep-calculator.js";

Input and output contract, TypeScript types and the guide for agents.