Guides

How to Use the Number of Days Calculator?

Learn how to use the number of days calculator: enter From and To dates, read Time between, include the end date, switch units, and count days or find a date.

Miryori Editorial Team3 min read
Try the Number of Days Calculator

Counting the days between two dates comes up constantly — deadlines, trips, billing periods, anniversaries. The number of days calculator does that count for you, in either direction, and can also turn a day count back into a date.

The number of days calculator takes a start date (From) and an end date (To) and reports the elapsed days in the Time between field. It counts the start date but not the end date by default; ticking Include end date adds one day. You can enter a day count instead of a date to find the date that many days forward or backward, and switch the output unit to weeks, months, or years.

How does the number of days calculator count days?

The core calculation is a date subtraction with one correction for how you treat the end date:

time between=date2−date1+include end date\text{time between} = \text{date}_2 - \text{date}_1 + \text{include end date}

Here date1\text{date}_1 is the From field and date2\text{date}_2 is the To field. The include-end-date term takes the value 1 when the option is switched on and 0 when it is off. With the option off, the result includes the starting date and excludes the end date, which is the calculator's documented default.

What inputs does the calculator offer?

The calculator exposes three result fields and a set of switches. Each one maps to a named input or output:

Field (source label) Role
From (date1) Start date, chosen from the calendar or typed in
To (date2) End date
Time between (time_between) Reported day count; enter a count here instead to solve for a date
Include end date (include_end_date) Value 1 includes the end date, value 0 excludes it
Working time (time_working) Output-only field: business days, Monday to Friday
Include / exclude some week days (include_exclude_days) Value 1 includes the chosen weekdays, value 0 excludes them
Custom time (custom_time) Output-only field: count of the selected weekdays

The last three features are optional refinements. Working time and Custom time are forced outputs, so you read them rather than type into them, and the seven individual weekday selectors only appear once the Include / exclude option has a value.

Worked example: April 4 to April 17, 2022

Enter April 4, 2022 in From and April 17, 2022 in To. Both dates fall in the same month and year, so the span is the difference of the calendar day numbers: 17−4=1317 - 4 = 13 days. That 13 is the default Time between result, which excludes the end date. Tick Include end date and the include-end-date term changes from 0 to 1, giving 14 days.

How do I find a date from a day count?

The calculator runs in reverse as well. To find the day a set number of days after a start date, enter the start date in From and the day count in Time between; the answer appears in To. To go backward, enter the day count in Time between and the known end date in To; the earlier date appears in From. Changing the unit of Time between also expresses the same span in weeks, months, or years.

FAQ

Does the count include the starting date?

Yes. By default the Time between field includes the start date and excludes the end date. The field's own help text states this convention, and the Include end date switch is the way to change it.

Can I use the calculator to count backward from an end date?

Yes. Enter the known end date in To and put the number of days in Time between. The calculator solves for From, giving the date that many days earlier.

How do I see the result in weeks, months, or years?

Change the unit of the Time between field. The calculator converts the same underlying day count into the unit you select rather than recalculating a different span.

What does the Include end date switch actually change?

It changes the include-end-date term in the formula from 0 to 1, adding exactly one day to the reported span when the end date is counted.

References

  • Omni Calculator, "Number of Days Calculator": date-difference formula, field labels and worked examples.
  • Gregorian calendar conventions for month lengths and elapsed-day counting.
Calculator

Number of Days Calculator

Calculate Number of Days with practical everyday formulas, interactive references and step-by-step results. Free, fast and private.

Try the Number of Days Calculator