Date conversion tool
Calculate the number of days
Choose dates and counting rules. The result appears above this form after submission.
Example Data Table
| Start date | End date | Calendar difference | Inclusive total | Suggested use |
|---|---|---|---|---|
| 2026-06-10 | 2026-06-12 | 2 days | 3 days | Short event range |
| 2026-01-01 | 2026-12-31 | 364 days | 365 days | Yearly planning |
| 2026-08-15 | 2026-08-10 | -5 days | -6 days | Backwards schedule check |
Formula Used
Calendar days = End Date − Start Date
In an OpenOffice Calc sheet, place the start date in A2 and the end date in B2.
=B2-A2This returns elapsed calendar days. The same date returns zero.
Inclusive days = Calendar days + 1 when the end date is later.
=B2-A2+1For an unsigned inclusive distance, use =ABS(B2-A2)+1. Working-day totals remove chosen weekends and valid holiday dates.
How to Use This Calculator
- Choose the start date and end date.
- Select calendar days, inclusive days, or working days.
- Choose signed results for direction or absolute results for distance.
- Set a weekend pattern when working days matter.
- Add holiday dates only when they should be excluded.
- Select Calculate Days. Review the result above the form.
- Download a CSV or print the result as a PDF record.
Planning With Date Differences
Counting days seems simple. Small choices can change the answer. A deadline may include its first date. A rental period may include both dates. A report may require only elapsed calendar days. This calculator makes each choice visible before you save a result.
OpenOffice Calc stores dates as serial values. That design makes date subtraction direct. Put the earlier date in one cell. Put the later date in another cell. Subtract the first value from the second value. The result is the number of calendar days between them. A formula such as =B2-A2 gives the usual elapsed-day result.
The order of the dates matters. A later end date creates a positive result. An earlier end date creates a negative result. Select absolute mode when you need distance only. Select signed mode when direction matters. Signed values are helpful for overdue tasks, backwards planning, and date validation rules. Absolute values suit simple comparisons.
Inclusive counting is different. It counts every calendar date touched by the range. For example, June 10 through June 10 is one inclusive day. The regular difference is zero. June 10 through June 12 is three inclusive days. The regular difference is two. Use inclusive counting for reservations, attendance windows, and daily service periods.
Working-day totals offer another useful view. They remove selected weekend days from the count. They can also remove listed holidays. This helps with staffing, delivery estimates, and internal deadlines. The calculator keeps the main calendar result separate. Therefore, you can compare calendar time with actual working time. Review the weekend pattern before relying on that figure.
Enter holidays in the format YYYY-MM-DD. Separate several dates with commas or new lines. Invalid dates are ignored during holiday matching. Use dates inside the selected range. Repeating a holiday changes nothing. A holiday already falling on an excluded weekend changes nothing. Keep your holiday list current when schedules cross a new year.
Dates have no time of day in this calculator. A date difference begins at midnight. It does not measure hours, minutes, or seconds. Use a time difference tool for exact timestamps. This page is best for daily schedules. It works well for school terms, project plans, billing ranges, leave tracking, and event preparation.
Check the result screen after calculation. It shows the selected method and a readable date range. It also provides calendar, inclusive, and working-day totals. Use the CSV button when you need a compact record. Use Print or Save PDF for a shareable summary. Keep the original dates beside exported results.
Careful date counting prevents minor planning mistakes. Always confirm which dates are included. Confirm the date order too. Review the holiday list when using workdays. With those checks, your number of days stays clear, consistent, and useful for decisions.
Save your settings before repeating a calculation. Consistent inputs give reliable comparisons across projects, teams, and reporting periods. Clear methods support confident planning.
Frequently Asked Questions
1. What OpenOffice formula calculates calendar days?
Use =B2-A2 when the start date is in A2 and the end date is in B2. The result shows elapsed calendar days between the two values.
2. Why is the result zero for matching dates?
Ordinary date subtraction measures the distance between dates. The distance from one date to itself is zero. Choose inclusive counting when one same-day entry should count as one day.
3. When should I use inclusive counting?
Use it when both the first and last calendar dates belong to the period. Reservations, attendance ranges, and daily service windows often use inclusive counting.
4. Does the calculator handle leap years?
Yes. It uses actual calendar dates. A February 29 date is handled correctly when the selected year is a leap year.
5. Can I calculate backwards from a later date?
Yes. Signed mode returns a negative result when the end date is earlier. Absolute mode removes that negative sign and shows the distance between dates.
6. How are holiday dates handled?
Valid holiday dates are removed only from working-day totals. Calendar and inclusive totals do not change. Holidays that already fall on excluded weekends do not reduce the count twice.
7. Which holiday date format is accepted?
Enter each holiday as YYYY-MM-DD. Separate entries with commas, semicolons, or new lines. The calculator reads valid dates and ignores invalid entries.
8. What does a signed result mean?
A positive number means the end date follows the start date. A negative number means it comes before the start date. Zero means the dates match.
9. Are weekends excluded automatically?
Only working-day totals use weekend settings. Calendar and inclusive totals include every date. Select the weekend pattern that matches your work schedule.
10. Can I export the calculation?
Yes. Use Download CSV to save the inputs and totals. Use Print or Save PDF to create a simple shareable copy.
11. How do I verify a result?
It keeps calculations clear, repeatable, and easy to verify.
Use dates consistently when comparing schedules, bookings, and deadlines.