It would seem that sleeping is a simple activity — you power down, regenerate over several hours and wake up fully recharged. Well, while this works for your battery powered electronics, humans have a different, more complicated system in place.
As soon as you fall asleep, your consciousness drifts away and your brain slows down. Brain waves frequency goes down from what we call alpha (8–13 Hz) to theta (4–8 Hz) and finally delta (1–4 Hz) frequency bands. These are three NREM (Non-REM) stages of sleep. When you're in your deepest sleep, i.e. in stage 3 of NREM, your brain oscillates much slower and is less perceptible to stimuli like light or sound. This means it's more difficult to wake up someone who's in the Slow Wave Sleep.
Your brain doesn't stay in the deep sleep for long — within 90 minutes it speeds up back to theta and then to alpha waves. This is when the magic happens and you switch from NREM to REM sleep. REM stands for Rapid Eye Movement and describes the dreaming phase of your sleep. Your body is more or less paralysed, but your eyes move rapidly. Interestingly enough, while your brain waves frequency is much higher than it was when you were in the deep sleep phase, it's even harder to wake you up.
After some time in the dreaming REM phase you fall back into deeper sleep and the cycle repeats. Usually each cycle takes about 90 minutes.
When the alarm clock wakes us up suddenly from deep sleep or interrupts the REM phase, our body doesn't appreciate it. We can feel unrested, groggy and cranky for a good part of the day. The best option is to wake up when we naturally drift to the lighter sleep phases and our brain is on the brink of consciousness, so the path to wakefulness is much shorter.
The sleep calculator above helps you pick the best moment to go to sleep and the time to wake up so that the time between them allows for several full 90 minute sleep cycles.
You can use it in two ways: if you're going to sleep now, you can calculate the optimal time to wake up; if on the other hand you have to get up at a specific hour, it will tell you when is the next window for you to get to bed.
Since you'll be sleeping lightly, you can use gentle alarms (like a wake up lamp or quiet, soft music) to wake up naturally. If you need, you can always set a secondary, appropriately loud alarm for a couple minutes later to make sure you don't oversleep.