BedtimePilot
EnglishMy plan

Readable sleep calculations

Get a result without JavaScript. The same calculation is available as HTML or JSON. Times are planning references, not measurements of sleep stages.

Sleep now with an explicit local context

Use an RFC3339 timestamp with an offset and an IANA time zone. For example, 2026-10-22T23:00:00+08:00 and Asia/Shanghai. The result remains tied to that instant; it does not mean the current time when someone reopens the link.

Machine-readable requests

GET /calculate/?mode=wake&time=07:00&sleepMinutes=450&latencyMinutes=10. Add &format=json for JSON, and optionally &lang=zh-Hans for Chinese HTML. Defaults: 10 minutes to fall asleep; if sleepMinutes is omitted, alternatives are 540, 450 and 360 minutes. The six-hour alternative is not a sufficient-sleep recommendation.

Modes: wake, bed, now. Only now accepts and requires at and timeZone; it must not include time. Clock-only wake/bed requests do not represent dated appointments or model daylight-saving changes.

JSON includes input, results, dayOffset relative to the anchor date, and a source URL. Timestamped results also include local dates and UTC instants. Invalid, unknown or repeated parameters return HTTP 400, never an unrelated default calculation. GET and HEAD are supported. Result responses are not stored in caches or submitted for indexing.

Calculation methodology · Adjust your calculation