Most sleep calculators work by factoring in your age, as well as the time you want to be in bed by or the time you wish to wake up, to calculate the ideal amount of sleep you should be achieving every night.