← All how-to recipes

How to count days until a date

✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)

Count down the days remaining to a deadline, event, or launch.

The formula

AppFormulaNotes
Excel (desktop)=A2-TODAY()A2 = the target date. Format the result as a plain number, not a date.
Google Sheets=A2-TODAY()Identical.
LibreOffice Calc=A2-TODAY()Identical.

How it works

Dates are day numbers, so target minus today is the remaining count: July 22 to December 25, 2026 is 156 days. If the result displays as a weird date like "5/6/1900", the cell inherited date formatting — switch it to Number. Use NETWORKDAYS(TODAY(),A2) to count only working days, and note the result goes negative once the date has passed (wrap in MAX(0,...) for a clean countdown).

Verified, not just documented

We ran =DATE(2026,12,25)-DATE(2026,7,22) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 156 — exactly the expected result. We then ran the same formulas in Google Sheets, executed 2026-08-30: a formula-only workbook goes into Google Drive, which converts it to a Sheet and recalculates every formula with Google’s own engine, and comes back out as .xlsx carrying the values Google computed. It returned 156 for the worked example, the same value LibreOffice produced. Both engines’ numbers on this page are executed results. The Excel formula follows Microsoft’s official documented syntax — we do not run desktop Excel.

Functions used

TODAY — see full Excel, Google Sheets & LibreOffice compatibility for each.

Related recipes

Related comparisons