03/22/2017 11:50 EDT | Updated 04/30/2018 09:46 EDT

This Sleep Calculator Finds You The Perfect Time To Go To Bed

Relying on your alarm clock alone might not cut it.

The advice sounds relatively simple: get eight hours of sleep, and wake up feeling great the next day. But the problem is, there's nothing simple about the factors that affect sleep, from what you ate for dinner to the individual sleep cycles that dictate your ideal amount of sleep.

Sleep cycles operate in approximately 90-minute intervals, going from stage 1 (light or non-REM sleep) to stage 5, or REM sleep, explains Psychology Today.

REM sleep makes up about 20 to 25 per cent of a healthy adult's sleep time, with shorter periods of REM during the first full cycle, and longer ones as the night goes on, according to the Division of Sleep at Harvard Medical School. While the specific reason for the importance of sleep cycles isn't known, it is hypothesized that it allows the brain to recuperate from the day, as well as store memories.

What scientists do seem to have figured out is that completing a full sleep cycle and waking up in NREM sleep can make the difference between feeling like you've had a good night's sleep and falling asleep on your desk by 2 p.m. the next day. So Hillarys, a window covering company in the U.K. (the connection will make sense in a moment) has put together a sleep calculator that takes these cycles into account, and suggests when you should get yourself into bed, based on what time you need to get up the next morning.

The company emphasizes the body's circadian rhythm, which is triggered by (you guessed it) daylight, so environmental factors like blinds can make all the difference. Because our bodies respond to light by feeling more awake, reports Harvard Medical School, we need to limit both natural light and electronics in our bedrooms when we're trying to sleep.

By inputting your wake-up time into this tool, you're given suggestions for when you should be hitting the sack each night. But our favourite part is its options for a few different bedtimes, allowing people who require more (or less) sleep to personalize their decisions.

Of course, when it comes to you and your bed, you know yourself best. So while this tool takes into account the approximately 14 minutes it takes people to actually fall asleep, if you know that number isn't for you, choose wisely and make a few calculations of your own.

UPDATE: An earlier version of this story attributed the sleep calculator to Web Blinds. That company has since been purchased by Hillarys, and the links have been updated.

Also on HuffPost

26 Ways to Sleep Better