---
title: "Sleep Calculator"
method: GET
path: "/api/calc/sleep-calculator"
tags: ["Health"]
---

# Sleep Calculator

`GET /api/calc/sleep-calculator`

## Request

- Base URL: `https://calcbright.com`
- URL: `https://calcbright.com/api/calc/sleep-calculator`
- Auth: none declared

Up at 7:00 AM? Aim for bed at 9:45 or 11:15 PM. Count back whole 90-minute sleep cycles to pick a bedtime or alarm that lands in light sleep, not deep sleep.

## Query parameters

- `mode` 'wake' | 'bed': I want to…
- `time` string: Wake-up time (HH:MM, 24-hour)
- `latency` number: Time to fall asleep (min)

## Response `200`

Calculation result

- CalcOutput
  - `ok` boolean
  - `tool` string
  - `name` string
  - `url` string: Open this link to see the full calculation
  - `inputs` object
  - `summary` string: Plain-text answer
  - `details` string
  - `result` object
  - `errors` object

## Other responses

- `400`: Invalid input (see errors)

---

[API](https://skmtc.dev/calcbright/apis/calcbright-calculator-api.md) · [All operations](https://skmtc.dev/calcbright/apis/calcbright-calculator-api/llms.txt) · [OpenAPI document](https://skmtc.dev/calcbright/apis/calcbright-calculator-api/revisions/f58229e56e58?raw)
