Everyday Life

How Many Days Until My Birthday Calculator

Settings
Reset
Share
Save
Embed
Report a bug

Share calculator

Add our free calculator to your website

Please enter a valid URL. Only HTTPS URLs are supported.


Use as default values for the embed calculator what is currently in input fields of the calculator on the page.


Input border focus color, switchbox checked color, select item hover color etc.


Please agree to the Terms of Use.

Preview

Save calculator

Calculator Settings

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Please enter a value within the allowed range.

Share calculator

What is a “how many days until my birthday” calculator?

This calculator tells you exactly how many days remain until your next birthday. You enter the month and day you were born, and it counts forward from today to the next time that date comes around. The year you were born does not matter for the countdown, only the recurring month and day.

It is the quickest way to answer the everyday question “How long until my birthday?” without flipping through a calendar or counting weeks by hand. The same approach works for any annual occasion: an anniversary, a friend’s birthday, or a yearly milestone.

How does the calculator work?

You provide two values:

  • the birth month, a whole number from 1 (January) to 12 (December), and
  • the birth day, a whole number from 1 to 31.

The calculator builds the next occurrence of that month-and-day pair. If this year’s birthday has not happened yet, it counts to this year’s date. If it has already passed, it rolls the target forward to the same date next year, then measures the gap from today.

Both today’s date and the target birthday are normalized to midnight, so the result is a clean whole number of calendar days.

Formula

Let BB be the next occurrence of your birthday and TT be today’s date (both at midnight). The number of days until your birthday is:

Days Until Birthday=BT\text{Days Until Birthday} = B - T

where the target birthday is chosen as:

B={this year’s date,if it is today or still aheadnext year’s date,if it has already passedB = \begin{cases} \text{this year's date}, & \text{if it is today or still ahead} \\ \text{next year's date}, & \text{if it has already passed} \end{cases}

The day count is obtained by dividing the elapsed time in milliseconds by the number of milliseconds in a day:

Days=round(BT86400000)\text{Days} = \text{round}\left(\frac{B - T}{86\,400\,000}\right)

Worked examples

Birthday coming up soon. Suppose today is June 12 and your birthday is June 17 (month 6, day 17). The date is still ahead this year, so the countdown is just 55 days.

Birthday that already passed. Suppose today is June 12 and your birthday is June 11 (month 6, day 11). This year’s date is behind us, so the calculator rolls forward to June 11 of next year. The result is the number of days from today to that date — roughly a full year minus one day.

Same-day birthday. If today is exactly your birthday, the countdown reads 00 days. The next celebration is happening right now.

Practical notes

  • The result is always relative to today, so it changes by one each day as your birthday gets closer.
  • February 29 birthdays are uncommon in non-leap years; in those years the next exact February 29 may be further out, so treat leap-day results accordingly.
  • Because only the month and day matter, you can use this tool to count down to any annual date, not just your own birthday.

If you want to count down to a specific future date instead of a recurring one, use the days until calculator. To count down to a holiday, try the days until Christmas calculator, and for a flexible countdown between any two dates see the date countdown calculator.

Report a bug

This field is required.