DuskDial

Find your cycle

Ninety minutes is an average. This is a notebook for the length that fits your own mornings: note when you got into bed, when you got up, and whether waking was fine or groggy, and the page tries every length from 70 to 120 minutes against the notes. It is arithmetic on what you write down, not a measurement of anything.

The length that best fits the example

100 minutes

From 9 mornings, 5 fine and 4 groggy. At that length the fine mornings land an average of 0 min from the end of a cycle, and the groggy ones 39 min.

Every length tried, against the example notebook. A lower score is a better fit; the misses are the average minutes between an alarm and the nearest end of a cycle.
CycleFine mornings miss byGroggy mornings miss byScore
70 min10 min24 min0.15
75 min25 min11 min0.34
80 min20 min24 min0.23
85 min10 min25 min0.16
90 min40 min11 min0.41
95 min25 min24 min0.26
100 min0 min39 min0.05
105 min25 min31 min0.22
110 min50 min16 min0.41
115 min40 min14 min0.36
120 min20 min29 min0.21
The example notebook: invented mornings, shown until you add one of your own.
MorningIn bedUpAsleepWakingRemove
Mon 14 Sept10:45 pm6:50 am7h 50mgroggy
Tue 15 Sept10:55 pm7:30 am8h 20mfine
Wed 16 Sept11:05 pm6:50 am7h 30mgroggy
Thu 17 Sept10:15 pm6:50 am8h 20mfine
Fri 18 Sept11:40 pm7:05 am7h 10mgroggy
Sat 19 Sept12:00 am8:35 am8h 20mfine
Sun 20 Sept11:30 pm8:05 am8h 20mfine
Mon 21 Sept11:00 pm6:50 am7h 35mgroggy
Tue 22 Sept9:35 pm6:10 am8h 20mfine

Adding your own mornings needs JavaScript. The fit above is worked for the example, so the method can be read without it.

How the fit works

For each morning, the time asleep is the time from getting into bed to getting up, less the 15 minutes the rest of the site allows for dropping off. For each of the 11 lengths from 70 to 120 minutes, in the same five-minute steps as the slider, the page works out how far into a cycle each alarm fell: nothing at the end of a cycle, half a cycle in the middle of one.

A fine morning scores that distance, so a fine morning at the end of a cycle scores nothing. A groggy morning scores the opposite, so a groggy morning in the middle of a cycle scores nothing. The score in the table is the average over every morning, from 0 to 0.5, and the length with the lowest one is the one the notes fit best. A tie goes to the length nearest ninety, where the slider starts.

In the example, every fine morning is exactly five cycles of a hundred minutes after the quarter hour to drop off, so a hundred scores best by a distance. Real notes are rarely that tidy, which is why the table shows every length and not only the winner: when several sit within a few hundredths of each other, the notes cannot tell them apart.

What it cannot tell you

It fits one length to a whole night, which is the same simplification the rest of the site makes. The review quoted on the ninety-minute page gives the first cycle of the night as about 70 to 100 minutes and later ones as about 90 to 120, which is why the lengths tried run from 70 to 120. It knows only what you wrote down: an alarm you slept through, a night you woke at three, or a drop-off that took an hour instead of a quarter are all invisible to it unless you change the drop-off on a wake page.

"Fine" and "groggy" are your own words for your own mornings, and nothing here checks them. With fewer than 7 mornings the page says the fit is a guess, because it is. The length it gives is the one that best fits your notes, not a measurement of your sleep.

Where the notebook is kept

In this browser, on this device, under the key duskdial:notebook, at most 60 mornings, the oldest dropped first. Nothing in it is sent anywhere, there is no account to attach it to, and nobody operating the site can see it. One button clears it, and clearing the site's data in your browser does too. The cookies and storage page lists it with everything else the site keeps.

The button that uses the fitted length sets the cycle slider the wake pages, the shift planner and the bedtime alarm all read, the same as moving it by hand. The notebook is not in the page's address, so a link to this page carries none of it.