How to Calculate Days Until a Job is Completed in Excel
Question details
The user needs an Excel formula to calculate the duration of a job by counting the days between the start date and the current date, and to dynamically stop counting once a completion date or indicator is recorded.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Tracking project timelines or task durations where open jobs continue counting days up to today, but closed jobs lock their final duration based on an end date.
- Observed behavior
- Requires a conditional formula to evaluate if a completion cell is empty and calculate the date difference accordingly.
Ensure that your start dates and completion dates are properly formatted as Date values in Excel, and that you have a dedicated column ready to log the final completion date.
Use IF, ISBLANK, and DAYS Functions
This method dynamically checks if a completion date is entered. If blank, it calculates days up to today; if filled, it calculates days up to the completion date.
By combining the IF function with ISBLANK, Excel can evaluate whether a job is still open or closed. The DAYS function then calculates the exact difference between the two respective dates.
Ensure you have a 'Start Date' column (e.g., B2), a 'Completion Date' column (e.g., C2), and a 'Days Open' column where the calculation will appear.
Click the first blank cell in your 'Days Open' column where you want the formula to output the result.
Type the formula =IF(ISBLANK(C2), DAYS(TODAY(), B2), DAYS(C2, B2)) into the formula bar.
Press Enter to see the result, then click and drag the fill handle at the bottom-right corner of the cell down to apply the formula to the rest of the rows in your table.

Calculate Days using the DATEDIF Function
An alternative approach using the legacy DATEDIF function, which is particularly useful if you later want to calculate the difference in months or years instead of just days.
Calculate Task Durations Easily with WPS Spreadsheet
WPS Spreadsheet provides comprehensive support for complex date functions like IF, ISBLANK, DAYS, and DATEDIF. Track project timelines effortlessly in a sleek and intuitive interface.
- 1. Open your project tracker: Launch WPS Spreadsheet and open your existing project management workbook.
- 2. Organize your data: Verify that your Start Date and End Date columns are formatted correctly using the 'Format Cells' menu.
- 3. Insert the date formula: Input =IF(ISBLANK(End_Date), DAYS(TODAY(), Start_Date), DAYS(End_Date, Start_Date)) into your duration column.
- 4. Fill the data: Use the fill handle to drag and apply the calculation to all remaining tasks.

Frequently Asked Questions
Why is the DAYS function returning a negative number?
The DAYS function calculates the difference by subtracting the second argument from the first. Ensure your formula is structured exactly as DAYS(end_date, start_date). If the start date is placed first, the mathematical result will be negative.
How can I exclude weekends when counting days until completion?
To count only working days instead of total calendar days, replace the DAYS function with NETWORKDAYS. The formula would look like: =IF(ISBLANK(C2), NETWORKDAYS(B2, TODAY()), NETWORKDAYS(B2, C2)).
What happens if my start date cell is blank?
If the start date cell is blank, Excel treats it as a zero value (January 1, 1900), resulting in an inaccurately large number of days (usually over 40,000). To prevent this, wrap your formula in an additional IF statement: =IF(ISBLANK(B2), "", IF(ISBLANK(C2), DAYS(TODAY(), B2), DAYS(C2, B2))).




