AbraCalc

Days Until Birthday Calculator

Find out exactly how many days until your next birthday. Enter your birthday and today's date.

Embed this tool on your site

How to use this tool

  1. Enter the birthday date.
  2. Set today's date.
  3. See the countdown in days.

Count down the exact number of days until your next birthday — or anyone else's.

Formula

next birthday = Date(this year, birth month, birth day)

If next birthday ≤ today, advance to next year: next birthday = Date(this year + 1, birth month, birth day)

Days until birthday = round((next birthday − today) ÷ 86,400,000 ms)

How it works

The calculator constructs the next occurrence of the user's birthday in the current year. If that date has already passed (or is today), it advances to the following year. The remaining days are then computed as the millisecond difference between that date and today, divided by the number of milliseconds in a day.

Both dates are represented in UTC midnight to avoid timezone-induced errors. The result is the exact number of calendar days remaining, inclusive of the birthday day itself being day zero on arrival. Note that in a leap year, a birthday of 29 February falls back to 1 March in non-leap years in most implementations; this calculator uses the stored month and day directly.

Worked example

Worked example: birthday 25 December, today 24 June 2026

  1. Today: 24 June 2026 (UTC midnight).
  2. Next birthday in current year: 25 December 2026 (UTC midnight).
  3. 25 December 2026 is after 24 June 2026, so no year advance needed.
  4. Difference = (25 Dec 2026) − (24 Jun 2026) = 184 days.

Days until next birthday: 184 days.

Key terms

UTC midnight
Midnight at Coordinated Universal Time used as the reference point for both dates, ensuring no hours bleed across day boundaries due to timezone offsets.
Calendar day
A 24-hour period from midnight to midnight; the calculator counts whole calendar days, not partial days.
Leap year birthday (29 Feb)
People born on 29 February celebrate annually on either 28 February or 1 March in non-leap years; this calculator uses the stored date as-is.
Year rollover
When the current year's birthday has already passed, the calculator targets the same date in the next calendar year.
86,400,000 ms
The exact number of milliseconds in one 24-hour day, used to convert the JavaScript date difference from milliseconds to days.

Frequently asked questions

How many days until my birthday?
This calculator finds the next occurrence of your birth month and day, then counts the days from today. If your birthday has already passed this year, it counts to next year's date.

References & sources