acalculator

Days until the 31st

The 31st comes in only seven months of the year: January, March, May, July, August, October, and December. The count starts from today’s date; pick another date to count from it instead.

Your numbers

Days until the 31st
12

From October 19, 2026, there are 12 days until the 31st, Saturday, October 31, 2026.

Next 31st
Saturday, October 31, 2026
The 31st after
Thursday, December 31, 2026

Answer for the example date Monday, October 19, 2026. It changes to today's date when the page loads.

Days until the 31st: 12. From October 19, 2026, there are 12 days until the 31st, Saturday, October 31, 2026.

Where is the next 31st?

How to calculate

Counts the days from today, or any date you choose, to the next 31st of a month, with its date and the 31st after it.

Example with the default inputs (Count from October 19, 2026) on the example date Monday, October 19, 2026: From October 19, 2026, there are 12 days until the 31st, Saturday, October 31, 2026.

Method: Find the first date on or after the start date that is the 31st of its month, skipping months that have no 31st, then count the days from the start date to it.

  • On the 31st, the count is 0, and the 31st after is the 31st of the next month that has one.
  • February, April, June, September, and November have no 31st, so the count skips to the 31st of the next month that has one. A leap year is a year divisible by 4, except a century year not divisible by 400 (2000 and 2400 are leap years; 1900 and 2100 are not).
  • The start date itself is not counted: from the day before, the count is 1.
  • Dates are calendar days with no time of day, so a time zone or a daylight-saving change never adds or loses a day.
  • Start dates from January 1, 1900 to December 31, 2400 work.

Machine-readable copies: Markdown, JSON.

Worked examples

Each example is checked against the calculator on every build.

  1. Count from 2026-10-19 gives Next 31st 2026-10-31, Days until the 31st 12, The 31st after 2026-12-31.Source: IETF RFC 3339, section 5.7 (days in each month) and Appendix C (the leap year rule) (https://www.rfc-editor.org/rfc/rfc3339)
  2. Count from 2026-12-31 gives Next 31st 2026-12-31, Days until the 31st 0, The 31st after 2027-01-31.Source: IETF RFC 3339, section 5.7 (days in each month) and Appendix C (the leap year rule) (https://www.rfc-editor.org/rfc/rfc3339)
  3. Count from 2027-02-01 gives Next 31st 2027-03-31, Days until the 31st 58, The 31st after 2027-05-31.Source: IETF RFC 3339, section 5.7 (days in each month) and Appendix C (the leap year rule) (https://www.rfc-editor.org/rfc/rfc3339)
  4. Count from 2028-02-15 gives Next 31st 2028-03-31, Days until the 31st 45, The 31st after 2028-05-31.Source: IETF RFC 3339, section 5.7 (days in each month) and Appendix C (the leap year rule) (https://www.rfc-editor.org/rfc/rfc3339)

Other questions people ask

How many days until the 31st?

It depends on the date, so the count above starts from today as your device shows it. From the 1st of a month that has a 31st, it is 30 days away; on the 31st itself the count is 0. Change “Count from” to count from another date.

What if today is the 31st?

Then the count is 0, because the next 31st on or after today is today itself. The page also shows the 31st after it, which is 31 to 61 days later.

Which months have a 31st?

Seven: January, March, May, July, August, October, and December. April, June, September, and November have 30 days, and February has 28, or 29 in a leap year.

How many times does the 31st come in a year?

7, one in each month that has 31 days.

What if this month has no 31st?

Then the count runs to the 31st of the next month that has one. From November 5 the next 31st is December 31, 56 days away, and from April 1 it is May 31, 60 days away.

How are the days until the 31st counted?

From the start date (today, unless you change it) to the next 31st, without counting the start date, in calendar days. Weekends and holidays count like any other day.