Free tools Windows power users keep installed
One-click scans. No signup required.
On GNU/Linux, print the number of complete 24-hour days since the Unix epoch with:
echo $(( $(date -u +%s) / 86400 ))
The Unix epoch—also called the Linux epoch for this purpose—began at 1970-01-01 00:00:00 UTC. The command gets the current time as epoch seconds, then divides by 86,400 seconds per day.
What the command calculates
date -uuses UTC, avoiding dependence on the computer’s configured local timezone.+%stells GNUdateto output seconds since 1970-01-01 00:00:00 UTC.- The shell arithmetic divides those seconds by
86400, the number of seconds in a nominal 24-hour day.
Because shell integer division drops the remainder, the result is the count of complete 24-hour periods elapsed—not a rounded-up count or a calendar-day count. At the epoch itself, the result is zero.
GNU Coreutils documents the epoch definition and conversion of dates to seconds; for example, its documentation shows that 1970-01-01 00:02:00 UTC converts to 120 seconds. GNU Coreutils: Seconds since the Epoch.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
#1 Best Overall
Get the day count for a specific date
For example, to find the whole-day count at midnight UTC on October 2, 2026, run:
echo $(( $(date -u -d '2026-10-02 00:00:00' +%s) / 86400 ))
Replace the date and time with the value you want. The -d option parses the supplied date, while -u interprets it in UTC. If you omit a timezone and -u, GNU date uses the host’s local timezone, which can affect the timestamp—especially near daylight-saving transitions.
Rank #2
Find the number of days between two dates
Convert both dates to epoch seconds using the same UTC reference time, subtract the earlier timestamp from the later one, then divide by 86,400:
d1=$(date -u -d '2020-01-01 12:00' +%s)
d2=$(date -u -d '2026-10-02 12:00' +%s)
echo $(( (d2 - d1) / 86400 ))
Using noon UTC for both dates gives a consistent point within each day and avoids daylight-saving changes in the local timezone. GNU’s FAQ notes that date has no direct command for finding days between dates and recommends converting to seconds, subtracting, and dividing by 86,400. GNU Coreutils FAQ.
Rank #3
GNU/Linux limits and date edge cases
The options and format used here are GNU date features. In particular, -d (also written --date) parses a supplied date, and %s outputs seconds since the epoch. These forms may not work on non-GNU Unix systems; check the system’s date documentation before using them in a portable script. The Linux date(1) manual documents %s and examples of parsing an epoch value: Linux date(1) manual.
Quick Recap
- Before 1970: GNU systems support negative epoch seconds and negative day values. For example, epoch value
@-1is 1969-12-31 23:59:59 UTC. The GNU manual defines@0as the start of the epoch and explains negative values: GNU Coreutils: Seconds since the Epoch. - Leap seconds: Most hosts ignore them. The result is therefore a count based on nominal 86,400-second days, not a tally that separately counts leap seconds. GNU Coreutils: Seconds since the Epoch.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

