Menu

Search toolsChangelog

to move to openDescribe the problem, not the tool

Guide answer

How many days count as one month?

There is no single exact number of days in a month. For a date-to-date calculation, move by calendar months and then count the remaining days; 31 January to 28 February is one calendar month even though only 28 days passed. For a financial or planning estimate, use the convention the contract or model names—often 30 days, 365/12, or an actual-day count—and state it, because those answers are deliberately different.

What to take away
  1. Calendar arithmetic preserves the day-and-month relationship; it does not replace every month with a fixed number of seconds.

  2. An average month is about 30.44 days, useful for estimates and wrong for an exact anniversary or deadline.

  3. Billing and interest calculations may define a 30-day month by contract, so the convention belongs beside the result.

The full explanation

Dates behave like numbers until they suddenly do not. A month has no fixed length, a day is not always 24 hours, and "how many days between" has two correct answers depending on whether you count the endpoints. Every one of these has produced real bugs in real software. Read the complete guide for the reasoning, examples and definitions behind this answer.

Use the idea

Sources