📊
Calculating the number of days elapsed between two dates is a frequent need for managing administrative deadlines, drafting civil contracts, or planning holidays in Spain. Knowing the exact number of calendar days and identifying how many of them correspond to working days or weekends is essential for complying with deadlines agreed upon by contracting parties or required by public administrations.
In 2026, with the increasing importance of time tracking in commercial and employment transactions, using an exact tool will help you avoid penalties. We recommend supplementing this calculation with the Working Days & Holidays Calculator if you need a breakdown that excludes regional holidays, or the Notice Period Calculator to estimate the statutory notice periods required by employment law.
⚙️ Time Limits according to the Civil Code
In the Spanish legal and civil sphere, time limits are calculated according to the following guidelines:
- Calendar Days: Include every single day of the year (Monday to Sunday, including national, regional, and local holidays). This is the default rule for rental contracts and bank payment notices.
- Working Days (Hábiles): Under public administration regulations, Saturdays, Sundays, and official public holidays are excluded from the count.
- Article 5 of the Civil Code: Establishes that if a deadline is set in days starting from a specific day, that day is excluded from the count, which begins on the following day.
🧮 How Date Arithmetic Works
To find the calendar days between a start date and an end date, the calculation subtracts the millisecond values of both dates:
Days Elapsed = (End Date - Start Date) in Milliseconds / (1000 milliseconds × 60 seconds × 60 minutes × 24 hours)
If you choose to include the end date, 1 unit is added to the final result, assuming that the last day is also counted as a full day of activity in the interval.
📊 Practical Examples of Date Calculations
Here are two common scenarios of date interval calculations in Spain:
- Contract start date: **July 1, 2026**
- Contract end date: **July 15, 2026**
- Calculation rule: Exclude end date (standard)
- Notice communication date: **May 1, 2026**
- Keys return date: **May 31, 2026**
- Calculation rule: Include end date (full occupancy period)
⚠️ Common Mistakes to Avoid
- Counting non-working days for administrative deadlines: For procedures with government bodies, Saturdays and Sundays are excluded. Forgetting this might lead you to believe a 10-day deadline expires earlier than it actually does.
- Confusing the start of the computation: Forgetting that the day of the notification itself does not count. The period begins at 00:00 on the following day.
- Ignoring February variation: Using fixed 30-day months to calculate intervals over a full year leads to significant cumulative errors.
❓ Frequently Asked Questions (FAQ)
Calendar days (*naturales*) include every day of the year. Working days (*laborables*) are days when business is usually conducted (often Monday to Saturday in retail, or Monday to Friday in offices). Business days (*hábiles*) exclude Saturdays, Sundays, and official public holidays in administrative procedures.
Under Spanish administrative law, if the last day of a deadline set in business days is a Saturday, Sunday, or public holiday, the deadline is automatically extended to the next working day.
Since the entry into force of Law 39/2015, Saturdays are classified as non-working days (*inhábiles*) across Spain for all administrative procedures, matching the status of Sundays.
No. Deadlines set in days are counted day by day, starting the day after notification. Deadlines set in months are calculated from date to date, ending on the same numerical day of the final month, regardless of how many days each month contains.