Menu

Countdown to a Date and Time

Pick a date and a time and watch the days, hours, minutes and seconds count down. Give it a name and share it with a link.

By Nethanel Bar, Co-founder & CEO

Last updated

Advertisement

Ready to actually learn to code?

Coddy teaches you by writing real code in your browser - interactive lessons, instant feedback, and AI help when you get stuck.

How a countdown to a date works

A countdown answers one question: how much time is left until a moment you care about. Pick the day, the month and the year (any date from 1900 to 2100), set a time, and give it a name if you want: a birthday, a trip, an exam. The heading then reads "Time left until" and your name, and the full date with its weekday sits under the number.

The big number is the count of whole days left. The clock under it splits the time into days, hours, minutes and seconds and updates every second. It reads your device's clock and time zone, so 18:30 means 18:30 where you are. When the moment comes, the page says it has arrived.

Everything runs in your browser and nothing is stored on a server. The countdown lives in its link: "Copy a link to this countdown" puts the date, the time and the name in the address, so anyone who opens it sees the same countdown. For holidays, the pages listed under the tool already know the date: Christmas, Halloween, Thanksgiving, New Year, Easter, the first days of spring and summer, Ramadan, Eid al-Fitr and Lunar New Year.

What a countdown teaches about time

  • A date on its own means midnight. A countdown to June 1 with no time runs out at 00:00 on June 1, the moment the day begins, not at the end of it.
  • Days, hours, minutes and seconds are one number split up. A day is 86,400 seconds and an hour 3,600; divide the seconds left and keep the remainder to fill each tile.
  • Time zones move the finish line. Midnight on New Year's Day reaches Tokyo hours before London, so a countdown is always read on someone's local clock.
  • Calendar days and full days are different counts. From the afternoon of the 1st to midnight as the 6th begins there are 5 calendar days, but only 4 full days and some hours.
  • In code, a countdown is one subtraction. Subtract two datetimes to get a duration, then split it with divmod; the Python example below does exactly that.

How to set up a countdown

  1. Name it, if you like

    Type what you are counting down to in "What are you counting down to?". The name becomes the heading, for example "Time left until Graduation". You can leave it empty.

  2. Pick the date

    Choose the day, the month by name and the year. The date starts on next New Year's Day, so there is a countdown on the page before you change anything.

  3. Set the time

    Leave 00:00 to count to the start of the day, or type the hour and minute of the event, such as 18:30 for a dinner or 09:00 for an exam. The time is read on your own clock.

  4. Watch it and share it

    The days and the clock update every second. Press "Copy a link to this countdown" and paste the link anywhere: it opens the same date, time and name.

Holiday dates at a glance

How each holiday countdown finds its date, with the dates in 2027 and 2028. The season times are in UTC; your local date can be a day off.

EventHow the date is set20272028
ChristmasDecember 25 every yearSaturday, December 25Monday, December 25
HalloweenOctober 31 every yearSunday, October 31Tuesday, October 31
Thanksgiving (US)Fourth Thursday of NovemberThursday, November 25Thursday, November 23
New Year's DayJanuary 1 every yearFriday, January 1Saturday, January 1
Easter (Western)First Sunday after the church full moon on or after March 21Sunday, March 28Sunday, April 16
First day of spring (north)The March equinoxMarch 20, 20:24 UTCMarch 20, 02:17 UTC
First day of summer (north)The June solsticeJune 21, 14:10 UTCJune 20, 20:01 UTC
Ramadan1 Ramadan on the Umm al-Qura calendarMonday, February 8Friday, January 28
Eid al-Fitr1 Shawwal on the Umm al-Qura calendarTuesday, March 9Saturday, February 26
Lunar New YearFirst day of the first lunar month, China's time (UTC+8)Saturday, February 6Wednesday, January 26

Countdowns to try

A birthday at midnight

Paste a small example into the tool and change one part at a time.

The heading reads "Time left until Mia's birthday". With the time left at 00:00, the clock runs out the moment March 14 begins on your device.

An exam in the morning

Copy the original value, run the tool, then compare the result.

The clock counts to 9:00 on June 8, not to midnight, so the days and hours match the time you walk in. Copy the link and your study group sees the same countdown.

A date that has passed

Take a value from your own work and use this tool to inspect or prepare it.

The moment is behind you, so the page says "This moment has arrived." A countdown never counts up; to count the days since a date, use the days between dates calculator.

The same countdown in Python

Python
from datetime import datetime
now = datetime(2026, 11, 21, 15, 30)target = datetime(2027, 6, 1, 18, 30)
left = target - nowhours, rest = divmod(left.seconds, 3600)print(left.days, "days", hours, "hours", rest // 60, "minutes")

Subtracting two datetimes gives a timedelta. Its days are the whole days left, and divmod splits the remaining seconds into hours and minutes, the way the clock tiles do. It prints 192 days 3 hours 0 minutes.

Common countdown mistakes

  • Expecting a date with no time to count to the end of that day. It counts to midnight at the start, so set a time if the event is in the evening.
  • Sending a link to someone in another time zone and expecting the same finish moment. The link carries the date and the clock time, and each person's device reads them in its own time zone.
  • Comparing this page with a holiday page. This page counts whole days left until the moment; the holiday pages count calendar days, so in the afternoon they show one more.
  • Forgetting to copy the link again after a change. The link holds what is on screen when you press the button.
  • Picking last year by mistake. Check the year: a moment in the past shows "This moment has arrived."

Countdown to a date FAQ

How do I count down to a specific date and time?

Pick the day, month and year, then type the time in the Time field. The days and the clock update every second until that moment on your device.

How are the days left counted on this page?

The big number is the whole days left before the moment, the same as the Days tile. Leftover hours stay in the clock and are never rounded up into a day.

Can I share my countdown?

Yes. Press "Copy a link to this countdown". The link holds the date, the time and the name, and opens the same countdown for anyone.

Which time zone does the countdown use?

Your device's. Someone who opens your link in another time zone counts to the same date and clock time in their zone, so their finish moment can differ from yours.

Is my countdown saved anywhere?

No. It runs in your browser and nothing is stored on a server. Keep the copied link if you want to come back to it.

What happens when the countdown reaches zero?

The page shows "This moment has arrived." It does not count up afterwards.

Why does a holiday page show one day more than my countdown?

Holiday pages count calendar days until the day, while this page counts whole days until the moment. In the afternoon, 5 calendar days before a date, this page reads 4 days and some hours.

How far ahead can I count down?

To any date up to the year 2100. The year field accepts 1900 to 2100.

Are there ready-made holiday countdowns?

Yes. Ten pages count to Christmas, Halloween, US Thanksgiving, New Year, Easter, the first day of spring, the first day of summer, Ramadan, Eid al-Fitr and Lunar New Year, each with its date already set.

Other developer tools

Coddy programming languages illustration

Learn to code with Coddy

Get started