How to calculate year progress

A precise formula for calculating year progress in code or a spreadsheet.

Use two boundaries

Define the start as midnight on January 1 and the end as midnight on January 1 of the next year in the same time zone. Progress is elapsed duration divided by total duration.

Time zones matter

The year begins at different instants around the world. Use the viewer's local time zone for a personal clock or state a fixed zone for a shared reporting system.

Avoid common errors

Do not assume every year has 365 days, and do not mix UTC dates with local times. Decide whether your output updates by second, minute or completed day.

Related year guides