GPS Time Converter — Weeks & Seconds Since 1980
GPS receivers count time in weeks and seconds since January 6, 1980. This converter translates between GPS time and UTC — applying the current 18-second leap-second offset, which you can see and update right on the tool.
GPS time.
Week numbers and seconds-of-week since the GPS epoch — January 6, 1980 — with the current leap-second offset applied.
GPS time = UTC − 18 s offset. Total GPS seconds = weeks × 604800 + seconds of week.
How GPS time works
The GPS system counts whole weeks and seconds-of-week since its epoch: midnight UTC on Sunday, January 6, 1980. A GPS time like week 2430, second 432018means 2430 weeks plus 432,018 seconds after that instant.
GPS time is continuous — it ignores leap seconds entirely. UTC, meanwhile, inserts a leap second whenever Earth's rotation drifts too far from atomic time. The result is that the GPS clock runs 18 seconds ahead of UTC today. To convert:
- GPS → Unix:
unix = gps_total + 315964800 - leap_seconds. - Unix → GPS:
gps_total = unix - 315964800 + leap_seconds, thenweeks = floor(gps_total / 604800).
The leap-second offset (18 s)
The offset used by this converter is stored as a single constant — no network lookups. It is currently 18 seconds, as set by the last leap second, which the International Earth Rotation Service (IERS) announced in Bulletin C 53 and UTC applied onJanuary 1, 2017.
The offset is labeled with its last-updated date on the tool itself. If the IERS ever announces another leap second, update the constant — it lives at the top ofsrc/scripts/niche-converters.js as EPOCH.gpsLeapSeconds.
Example conversions
- Week
0, second0→ January 6, 1980 00:00:00 UTC — but the epoch instant is actually 18 s after GPS time zero. - Week
2430, second432018→ August 7, 2026 00:00:00 UTC.
In your own code
- Go:
time.Unix(315964800 - 18 + week*604800 + sow, 0).UTC(). - Python:
datetime(1980, 1, 6, tzinfo=timezone.utc) + timedelta(seconds=week*604800 + sow + 18)— add the leap offset to land on the same UTC instant. - C:
unix = gps + 315964800 - 18withgmtime_r().
Gotchas
- Week rollover — GPS broadcasts the week number as 10 bits (0–1023), so it wraps every ~19.6 years: August 22, 1999 and April 6, 2019. Logs with small week numbers may need +1024 or +2048 added back.
- Leap seconds drift — the 18 s offset is only correct between 2017 and the next leap second. Older logs need the offset that was current at the time (e.g. 16 s for 2009–2012, 17 s for 2015–2016).
- Seconds-of-week range — valid values are 0–604799; 604800 is the start of the next week.
- Day 0 is Sunday — GPS weeks begin Sunday, so second 0–86399 is Sunday.
Related tools
For continuous time counts from the other classic eras, try theNTP timestamp converter (seconds since 1900) or theUnix timestamp to date converter.
Related converters
- Full online epoch converter — Unix time with batch conversion and code snippets.
- Unix timestamp to date converter — decode any epoch value into a readable date.
- Date to epoch converter — turn any date string back into a Unix timestamp.
- Milliseconds to epoch converter — for
Date.now()values and high-precision APIs. - Snowflake ID converter — decode Discord and Twitter/X 64-bit IDs.
- LDAP / Active Directory timestamp converter— 100-nanosecond FileTime values.
- GPS time converter — week numbers and seconds-of-week since 1980.
- NTP timestamp converter — seconds since 1900, with the 64-bit packet form.
- .NET DateTime ticks converter — 100-nanosecond ticks since year 1.
- Mac HFS+ timestamp converter — seconds since 1904.
- Excel date converter — OADate serial numbers, days since 1900.