# TOG calculator

> Calculates the recommended TOG value and gives clothing advice for a baby or child to sleep safely, based on room temperature, age and location. Based on the safe sleep advice of the Dutch safety institute VeiligheidNL and the TOG tables of sleeping bag makers. Not medical advice.

The advice is the TOG value of the **sleeping bag** (the number on the label). The clothing underneath is listed separately. If in doubt, the tool chooses the lighter option: too warm is more dangerous than a little too cool.

Languages: Nederlands (`lang=nl`, https://togsense.app/nl/tog-berekenen), English (`lang=en`, https://togsense.app/en/tog-calculator), Deutsch (`lang=de`, https://togsense.app/de/tog-rechner), Français (`lang=fr`, https://togsense.app/fr/calculateur-tog). Add `lang=<language>` to /api/tog or /llms.txt for another language; the input names stay the same.

## Calling

- HTML: `https://togsense.app/en/tog-calculator?temp=18&age=6`. The full advice is in the server HTML in `<section id="tog-result">`; JavaScript is not needed. The first sentence (`#tog-summary`) lists the inputs used and the corrected temperature.
- JSON: `https://togsense.app/api/tog?temp=18&age=6&lang=en`. Fields include `recommendedTog`, `clothing`, `warnings`, `missingOptionalFields`, `suggestedFollowUpQuestions`, `monthAdvice` (link to this month's article) and `text` (readable advice).
- WebMCP: tool `calculate_tog_value` on https://togsense.app/en/tog-calculator, with the same input names as below. Without a WebMCP browser, the form (`<form method="get">`) is the same tool.

Are optional fields missing? Then ask the user the questions from `suggestedFollowUpQuestions` and call the tool again.

## Parameters

- `temp` (required): Number from 10 to 35 °C inclusive; decimals with a point or comma (18.5 or 18,5). Temperature in the bedroom in degrees Celsius at bedtime, e.g. 18 or 19.5 (10–35). Sets the basis of the TOG advice.
- `age` (recommended): Whole number: age in months, 0 to 72 inclusive. Age of the child in whole months (0–72). Younger than 3 months in a room below 18 °C: slightly warmer; from 24 months: slightly lighter. Ask for it if it is missing.
- `location` (optional): Text, at most 100 characters. Name of the place where the child sleeps, e.g. Utrecht. The expected lowest outside temperature tonight (Open-Meteo) is taken into account for cooling and draughts. Without a place, the tool only uses the room temperature.
- `warmth` (optional): Valid values: `average` (average), `runs_cold` (gets cold easily), `runs_warm` (gets warm easily). How easily the child gets cold or warm: average, runs_cold, runs_warm. runs_cold (gets cold easily) or runs_warm (gets warm easily) shifts the advice by 1 °C. Leave out if unknown.
- `neck_warm` (optional): Valid values: `no` (warm and dry), `yes` (hot or sweaty). yes if the back of the child's neck feels hot or sweaty now (the advice becomes one layer lighter), no if it is warm and dry. Leave out if not checked.
- `clothing` (optional): Text, at most 200 characters. What the child is wearing now, in plain words, e.g. "long-sleeved bodysuit, pyjama, sleeping bag 2.5 tog". Compared with the advice: too warm, too cool or matching.

Leave out if unknown. Any other value gives no advice but an error per parameter (`errors`; HTTP 400 on /api/tog).

With all fields: `https://togsense.app/en/tog-calculator?temp=17&age=6&location=Tilburg&warmth=runs_cold&neck_warm=no&clothing=long-sleeved+bodysuit%2C+pyjamas%2C+sleeping+bag+2.5+tog`

## TOG table (sleeping bag)

| Room temperature | Sleeping bag TOG | Clothing |
|---|---|---|
| above 24.0 °C | 0.2–0.5 | Sleeveless bodysuit + very thin summer sleeping bag |
| 22.0–24.0 °C | 0.5–1.0 | Short-sleeved bodysuit + thin summer sleeping bag |
| 20.0–21.9 °C | 1.0–2.0 | Long-sleeved bodysuit + sleeping bag |
| 18.0–19.9 °C | 2.0–2.5 | Long-sleeved bodysuit + pyjama + winter sleeping bag |
| 16.0–17.9 °C | 2.5–3.5 | Long-sleeved bodysuit + warm pyjama or sleepsuit with feet + thick winter sleeping bag |
| below 16.0 °C | 3.5+ | Long-sleeved bodysuit + warm pyjama with feet + thick winter sleeping bag with sleeves; better to heat the room a little |

## Calculation rules

1. Start with the room temperature and add the adjustments (together at most ±2 °C):
   - age under 3 months and room below 18 °C: −0.5 °C
   - age from 24 months: +0.5 °C
   - warmth runs_cold: −1 °C; runs_warm: +1 °C
   - neck_warm=yes (back of the neck hot or sweaty): +1.5 °C
   - lowest outside temperature tonight (19:00–07:00) at the location: ≤ 0 °C −1 °C, ≤ 5 °C −0.5 °C, ≥ 15 °C +0.5 °C, in between ±0 °C
2. Rounding and boundaries: the corrected temperature is rounded to 0.1 °C (half up); the ranges in the table apply to that rounded value. A boundary belongs to the band that starts there: 18.0 °C falls in 18.0–19.9 °C. Only 24.0 °C still belongs to 22.0–24.0 °C; above that it is hot. The lowest outdoor temperature is not rounded for the comparison (it is shown in whole degrees). The TOG on the line is rounded to 0.01 before the sleeping bag size is chosen.
3. With that temperature: choose the band from the table for the clothing, and read the sleeping bag TOG off a straight line between these points (°C → TOG): 27 → 0.2, 24 → 0.5, 22 → 1.0, 20 → 2.0, 18 → 2.5, 16 → 3.5.
4. Round to a sleeping bag size (0.2, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5 TOG); exactly in between becomes the lighter one.
5. Clothing, from the inside out: always exactly one bodysuit (sleeveless above 24 °C, short sleeves from 22 °C, otherwise long sleeves); below 20 °C one pyjama or sleepsuit over it (below 18 °C a warm one, preferably with feet); socks only as an option with a pyjama without feet. From 24 months the bodysuit under a pyjama is optional (the parents' choice); without a pyjama it is still needed. Never a second bodysuit, never a blanket over the sleeping bag, never a hat.
   Estimated TOG: sleeveless bodysuit 0.2; short-sleeved bodysuit 0.2; long-sleeved bodysuit 0.5; pyjama or sleepsuit 1.0; warm pyjama or sleepsuit with feet (towelling, velour or fleece) 1.5; socks 0.1. The total is bodysuit + pyjama + sleeping bag; optional items (socks, the bodysuit from 2 years) do not count.
6. Warnings: room above 24 °C (overheating) or below 16 °C (better to heat the room), younger than 3 months, a hot neck, and a duvet, blanket, pillow or hat in `clothing` (never safe).

## Double check

Every advice is checked against these rules before it is shown; if one fails, the tool gives no advice (HTTP 500 on /api/tog). The answer lists the rules in `checks`.

- Exactly one bodysuit, as the first layer on the body (from 2 years optional under a pyjama)
- At most one pyjama or sleepsuit, over the bodysuit
- Otherwise only socks, and they are always optional
- Always exactly one sleeping bag, in a size that is sold and within the range of the table
- Sleeveless only above 24 °C, short sleeves only from 22 °C, a pyjama only below 20 °C, a warm pyjama only below 18 °C
- The total is the sum of bodysuit, pyjama and sleeping bag: at most 5.5 TOG, and above 24 °C at most 1.2 TOG
- Never a hat, blanket, duvet, pillow or hot-water bottle in the advice
- A warning for a room above 24 °C or below 16 °C

## App: TOG tonight

In the app TOG tonight you pair a Bluetooth thermometer in the nursery. The app then uses the real temperature and keeps track for 7 days of how the room cools down at night. That history stays on your phone only: nothing is sent to a server. You can also do it on this website, in Chrome or Edge on a computer or Android phone: tap "Pair your sensor" at the top right. The advice then uses the measured temperature as long as the page is open. Safari and Firefox cannot use Bluetooth; use the app there. Supported sensors: BTHome (including Xiaomi with pvvx firmware, Shelly BLU); Xiaomi with pvvx firmware (old format); Govee H5072/H5075; SwitchBot Meter. Not yet in the App Store and Google Play.

## Sensors (https://togsense.app/en/sensors)

- On this website: Pair a Bluetooth thermometer at the top right of the page. The reading fills in the room temperature and the advice updates with every new reading. Works in Chrome and Edge on a computer or Android phone. Safari and Firefox cannot use Bluetooth. As long as the page is open. The website keeps no history. Nothing is sent to our server except the temperature in the link, just as when you fill it in yourself.
- In the app TOG tonight: The app listens to your thermometer and keeps track of how the room cools down at night. 7 days of history, averaged per quarter of an hour, on your phone only. Choose what the advice uses: the temperature now, or the coldest moment of last night (19:00–07:00). You can see how many degrees your nursery cools down on average between 19:00 and the coldest moment of the night.
- With Homey: the app Baby Sleepwear: Have a Homey Pro? Then any device that measures a temperature in Homey works, and you see the advice in the widget Sleepwear tonight on your dashboard. Any sensor or thermostat with a temperature: Zigbee, Z-Wave, Wi-Fi or Bluetooth, from any brand Homey knows. No extra thermometer needed. Uses tonight's lowest outside temperature at your Homey's location, just like the calculator does with a town. You set age and how easily your child gets cold or warm once in the widget. Your readings stay in your Homey.

## Safe sleep

- Don't use a duvet, pillow or loose blankets, and don't put a blanket over the sleeping bag: the sleeping bag is all the bedding your child needs.
- Feel the back of the neck to check your child is comfortable: warm and dry is good, sweaty is too warm. Cold hands are normal.
- After the first few days, no hat in bed: your child loses heat through their head.
- The sleeping bag must fit well around the neck and armholes, so the head cannot slip inside.
- Better a little too cool than too warm: overheating is more dangerous than being a little cold.

## Examples

- [16 °C, Baby aged 6 months: 3.5 TOG](https://togsense.app/en/tog-calculator?temp=16&age=6)
- [18 °C, Baby aged 6 months: 2.5 TOG](https://togsense.app/en/tog-calculator?temp=18&age=6)
- [20 °C, Baby aged 6 months: 2.0 TOG](https://togsense.app/en/tog-calculator?temp=20&age=6)
- [22 °C, Baby aged 6 months: 1.0 TOG](https://togsense.app/en/tog-calculator?temp=22&age=6)
- [16 °C, Toddler aged 2.5 years: 3.0 TOG](https://togsense.app/en/tog-calculator?temp=16&age=30)
- [18 °C, Toddler aged 2.5 years: 2.5 TOG](https://togsense.app/en/tog-calculator?temp=18&age=30)
- [20 °C, Toddler aged 2.5 years: 1.5 TOG](https://togsense.app/en/tog-calculator?temp=20&age=30)
- [22 °C, Toddler aged 2.5 years: 1.0 TOG](https://togsense.app/en/tog-calculator?temp=22&age=30)

## Advice by month

For each month an article with the table from the same calculation (average night of that month, Open-Meteo (ERA5), De Bilt (the Netherlands), average 1991–2020), explanation and products. Product links are affiliate links via `/uit/<product>/<shop>`. Overview: https://togsense.app/en/advice

- [January: warm enough, without too many layers](https://togsense.app/en/advice/january)
- [February: cold nights and a warm radiator](https://togsense.app/en/advice/february)
- [March: the change begins](https://togsense.app/en/advice/march)
- [April: changeable weather, changing layers](https://togsense.app/en/advice/april)
- [May: from the winter sleeping bag to lighter](https://togsense.app/en/advice/may)
- [June: long, light evenings](https://togsense.app/en/advice/june)
- [July: heat and warm nights](https://togsense.app/en/advice/july)
- [August: warm nights and cooler mornings](https://togsense.app/en/advice/august)
- [September: cool nights, warm days](https://togsense.app/en/advice/september)
- [October: back to the winter sleeping bag](https://togsense.app/en/advice/october)
- [November: damp and chilly](https://togsense.app/en/advice/november)
- [December: the holidays and sleepovers](https://togsense.app/en/advice/december)
