← All how-to recipes

How to count days until a date

✓ Verified in LibreOffice 25.8.7.3

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

The formula

AppFormulaNotes
Excel=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. Every formula here is confirmed by actually executing it.