A full day-night cycle in Minecraft lasts 20 minutes, or 24,000 ticks. Day lasts 10 minutes, night lasts 8 minutes and 20 seconds, and sunset and sunrise each last 50 seconds. Below we break down every part of the day in ticks and in-game hours, along with sleeping hours, moon phases, and commands for changing the time.
- The full cycle: 20 minutes, or 24,000 ticks at 20 ticks per second.
- Day lasts 10 minutes, sunset 50 seconds, night 8 minutes and 20 seconds, sunrise 50 seconds.
- One in-game hour equals 50 real seconds, meaning in-game time runs 72 times faster than real time.
- Phantoms start appearing after 3 in-game days without sleep, and you can change the time of day with the /time set command.
How long do day, night, sunset, and sunrise last
According to the Daylight cycle page on the Minecraft Wiki, a day in the game is split into four parts. The time counter starts at tick 0, which corresponds to 6:00 AM.
- Day: ticks 0 to 12,000, from 6:00 AM to 6:00 PM in-game time, 10 minutes.
- Sunset: ticks 12,000 to 13,000, from 6:00 PM to 7:00 PM, 50 seconds.
- Night: ticks 13,000 to 23,000, from 7:00 PM to 5:00 AM, 8 minutes and 20 seconds.
- Sunrise: ticks 23,000 to 24,000, from 5:00 AM to 6:00 AM, 50 seconds.
In-game time runs 72 times faster than real time, so one in-game hour on the clock takes 50 real seconds, and one real minute equals 1 hour and 12 minutes in-game. A new world always starts in the morning. The day cycle only works in the Overworld, which is why a Clock in the Nether and The End spins around with no rhyme or reason.
When can you sleep, and when do monsters appear
A bed doesn't work right away after sunset. According to the table on the same wiki page, on a clear day you can lie down starting at tick 12,542 (around 6:32 PM) until tick 23,460 (around 5:27 AM). During rain the window is longer, and during a thunderstorm you can sleep at any time. If you try too early, Java will show the message "You can only sleep at night or during a thunderstorm."
Sleeping skips time forward to dawn and stops the rain. In multiplayer, this is governed by the players_sleeping_percentage rule in Java or playerssleepingpercentage in Bedrock. By default it's set to 100, so every Player in the Overworld has to be asleep. We cover how to make a bed on the bed in Minecraft page.
The most dangerous part of the night is actually shorter than the night itself. On a clear night, monsters can spawn in open areas from tick 13,188 to 22,812, roughly 8 minutes. If you don't have a bed yet, check out our guide on how to survive the first night.
Moon phases and Phantoms
Each night has one of eight moon phases. As described on the Moon page on the Minecraft Wiki, the phase changes at the end of every sunrise, so the full cycle lasts 8 in-game days, or 192,000 ticks, about 2 hours and 40 minutes. The full moon matters: it brings the most Slimes in the Swamp, the new moon has none at all, and black cats can only appear during a full moon. Wait, "czarne koty" - black cats, should use "Cat" official name but it's about black-colored cats, fine as is.
You can see the day count on the F3 debug screen in Java. In Bedrock, turn on the day counter in game settings under "Show days played." You can calculate the moon phase from the day number: it's the remainder of the day number divided by 8, plus 1.
Phantoms make sure you sleep regularly. According to the Phantom page, they spawn above a Player whose "time since last rest" stat exceeds 72,000 ticks, or 3 in-game days. In Java they require night or a thunderstorm, and the Player must be standing above sea level under open sky, while in Bedrock they can appear even during the day in dark places. Phantoms burn in sunlight and avoid Cats. You can read more about them on the Phantom in Minecraft page.
How to change the time of day with a command
With cheats enabled, you can set the time of day using the /time set command with a tick count or a named value:
- /time set day sets tick 1000, which is morning,
- /time set noon sets tick 6000, which is midday,
- /time set night sets tick 13,000, the start of night,
- /time set midnight sets tick 18,000, midnight,
- Bedrock also supports /time set sunset (12,000) and /time set sunrise (23,000).
The /time add 24000 command advances time by one full day, and therefore by one moon phase. You can freeze the cycle with the advance_time game rule in Java or dodaylightcycle in Bedrock, set to false. In Java, the old doDaylightCycle name changed in version 1.21.11, along with doInsomnia, now called spawn_phantoms, which disables Phantoms.
You'll find ready-made recipes on the day code, night code, and freeze time pages. We cover the full syntax in our /time and /gamerule command entries.