Home
Calculator
Add / Subtract Days
Start Date
Number of days to add or subtract
Add years, months or weeks
How to Add or Subtract Days to a Date

To add or subtract days to a date
, you can use the following steps:- Convert the date to a datetime object. You can use the datetime.datetime() function to do this.
- Add or subtract the desired number of days to the datetime object. You can use the datetime.timedelta() function to do this.
- Convert the datetime object back to a date. You can use the datetime.date() function to do this.
Here is an example of how to add and subtract days to a date in Python:
import datetime # Convert the date to a datetime object. date = datetime.datetime(2023, 9, 27) # Add 10 days to the date. new_date = date + datetime.timedelta(days=10) # Subtract 5 days from the date. new_date = date - datetime.timedelta(days=5) # Print the new date. print(new_date)
2023-10-07 2023-09-22
- Create a new Date object. You can do this using the new Date() constructor.
- Set the date of the Date object. You can use the setDate() method to do this.
- Add or subtract the desired number of days to the Date object. You can use the setDate() method to do this, passing in the new day of the month.
- Return the Date object.
Here is an example of how to add and subtract days to a date in JavaScript:
// Create a new Date object. const date = new Date(); // Add 10 days to the date. date.setDate(date.getDate() + 10); // Subtract 5 days from the date. date.setDate(date.getDate() - 5); // Return the Date object. console.log(date);
2023-10-07T00:00:00.000Z 2023-09-22T00:00:00.000Z
// Create a new Date object. const date = new Date(); // Add 10 days to the date. date.addDays(10); // Subtract 5 days from the date. date.subtractDays(5); // Return the Date object. console.log(date);
2023-10-07T00:00:00.000Z 2023-09-22T00:00:00.000Z
Note: The above code example is generated by Bard, the AI Model developed by Google
Days from Today / Days From Now
Calendar Days from Today (Thursday, 30 Nov 2023) | Date |
---|---|
5 days from today | Tuesday, 5 Dec 2023 |
7 days from today | Thursday, 7 Dec 2023 |
10 days from today | Sunday, 10 Dec 2023 |
14 days from today | Thursday, 14 Dec 2023 |
15 days from today | Friday, 15 Dec 2023 |
20 days from today | Wednesday, 20 Dec 2023 |
21 days from today | Thursday, 21 Dec 2023 |
28 days from today | Thursday, 28 Dec 2023 |
30 days from today | Saturday, 30 Dec 2023 |
31 days from today | Sunday, 31 Dec 2023 |
35 days from today | Thursday, 4 Jan 2024 |
40 days from today | Tuesday, 9 Jan 2024 |
42 days from today | Thursday, 11 Jan 2024 |
50 days from today | Friday, 19 Jan 2024 |
56 days from today | Thursday, 25 Jan 2024 |
60 days from today | Monday, 29 Jan 2024 |
75 days from today | Tuesday, 13 Feb 2024 |
80 days from today | Sunday, 18 Feb 2024 |
90 days from today | Wednesday, 28 Feb 2024 |
100 days from today | Saturday, 9 Mar 2024 |
120 days from today | Friday, 29 Mar 2024 |
150 days from today | Sunday, 28 Apr 2024 |
180 days from today | Tuesday, 28 May 2024 |
360 days from today | Sunday, 24 Nov 2024 |
Business Days from Today / Business Days From Now
Business Days from Today (Thursday, 30 Nov 2023) | Date |
---|---|
2 business days from today | Monday, 4 Dec 2023 |
3 business days from today | Tuesday, 5 Dec 2023 |
4 business days from today | Wednesday, 6 Dec 2023 |
5 business days from today | Thursday, 7 Dec 2023 |
6 business days from today | Friday, 8 Dec 2023 |
7 business days from today | Monday, 11 Dec 2023 |
8 business days from today | Tuesday, 12 Dec 2023 |
9 business days from today | Wednesday, 13 Dec 2023 |
10 business days from today | Thursday, 14 Dec 2023 |
12 business days from today | Monday, 18 Dec 2023 |
14 business days from today | Wednesday, 20 Dec 2023 |
15 business days from today | Thursday, 21 Dec 2023 |
20 business days from today | Thursday, 28 Dec 2023 |
21 business days from today | Friday, 29 Dec 2023 |
28 business days from today | Tuesday, 9 Jan 2024 |
30 business days from today | Thursday, 11 Jan 2024 |
31 business days from today | Friday, 12 Jan 2024 |
35 business days from today | Thursday, 18 Jan 2024 |
40 business days from today | Thursday, 25 Jan 2024 |
42 business days from today | Monday, 29 Jan 2024 |
45 business days from today | Thursday, 1 Feb 2024 |
50 business days from today | Thursday, 8 Feb 2024 |
56 business days from today | Friday, 16 Feb 2024 |
60 business days from today | Thursday, 22 Feb 2024 |
75 business days from today | Thursday, 14 Mar 2024 |
80 business days from today | Thursday, 21 Mar 2024 |
90 business days from today | Thursday, 4 Apr 2024 |
100 business days from today | Thursday, 18 Apr 2024 |
120 business days from today | Thursday, 16 May 2024 |
150 business days from today | Thursday, 27 Jun 2024 |
180 business days from today | Thursday, 8 Aug 2024 |
360 business days from today | Thursday, 17 Apr 2025 |
Add Date Calculator
Formula for Calendar Add Days and Subtract Days
A. To Add days to a given date
Create date with given start date in string format start Date = new Date(start date in string);
0 means same day, -1 previous day, +32 goes into next month and adds remaining days of that month.
To subtract, pass -ve value and the days will be computed
The return value of the set Date is time in milliseconds format
Convert the timestamp to readable text format
Add Business Days / Add Work Days Calculator
1. To add work days or business days to start date
Find number of weeks - assuming 5 business days, find the number of weeks
Number of days / 5 = weeks
Take whole part for weeks and remainder part for days
Number of days % 5 = remainder days
week count = truncate (number of days / 5);
day count= number of days % 5;
Multiply by 7 to get actual calendar days use that to add to the start date
days to add = weekCount * 7 + dayCount;
Get the day information. If it is 6 (friday), then add 2 to the number of days
If it is 0 (Sunday), then add 1 to the number of days