# Unix Time Calculator

Convert Unix timestamps to dates and perform epoch arithmetic. Add or subtract seconds, minutes, hours, or days from any Unix timestamp.

## What this calculates

Convert Unix timestamps to human-readable dates and do quick timestamp math. Enter any epoch value, optionally add or subtract time, and see the result in UTC, ISO 8601, and more. Handy for debugging logs, scheduling jobs, or comparing event times.

## Inputs

- **Unix Timestamp (seconds)** — Seconds since January 1, 1970 (UTC).
- **Add/Subtract Amount** — A positive or negative number to add to the timestamp.
- **Offset Unit** — options: Seconds, Minutes, Hours, Days, Weeks

## Outputs

- **Adjusted Timestamp** — The timestamp after applying the offset.
- **UTC Date/Time** — formatted as text — Human-readable date in UTC.
- **ISO 8601** — formatted as text — Date in ISO 8601 format.
- **Milliseconds** — The timestamp in milliseconds (used by JavaScript Date).
- **Day of the Week** — formatted as text — The day of the week for this date.
- **Relative Time** — formatted as text — Approximate time relative to now.

## Details

Unix time (also called epoch time or POSIX time) counts the seconds since midnight UTC on January 1, 1970. It is the standard way computers track time internally.

**Why timestamp arithmetic matters:** Developers frequently need to answer questions like "what time was 3600 seconds before this log entry?" or "what is the timestamp 7 days from now?" This calculator lets you add or subtract any duration from a given timestamp.

**Common Durations in Seconds:**

| Duration | Seconds |
|----------|---------|
| 1 minute | 60 |
| 1 hour | 3,600 |
| 1 day | 86,400 |
| 1 week | 604,800 |
| 30 days | 2,592,000 |
| 365 days | 31,536,000 |

**Timestamps vs. Milliseconds:** Many programming languages (JavaScript, Java) use milliseconds since epoch instead of seconds. Multiply a Unix timestamp by 1,000 to get the millisecond version, or divide a millisecond timestamp by 1,000 to get standard Unix time.

**Tip:** If a timestamp has 13 digits, it is probably in milliseconds. A 10-digit timestamp is in seconds.

## Frequently Asked Questions

**Q: What is Unix time?**

A: Unix time is the number of seconds that have passed since January 1, 1970, 00:00:00 UTC (the Unix epoch). It provides a simple, timezone-independent way to represent any point in time as a single integer.

**Q: How do I get the current Unix timestamp?**

A: In most languages it is one line. JavaScript: Math.floor(Date.now() / 1000). Python: import time; int(time.time()). Bash: date +%s. PHP: time(). The result is an integer representing the current second since epoch.

**Q: What is the difference between seconds and milliseconds timestamps?**

A: A Unix timestamp in seconds is a 10-digit number (as of 2024). Many languages like JavaScript and Java use 13-digit millisecond timestamps instead. To convert, multiply seconds by 1,000 or divide milliseconds by 1,000.

**Q: Can Unix timestamps be negative?**

A: Yes. A negative Unix timestamp represents a date before January 1, 1970. For example, -86400 represents December 31, 1969. Most modern systems support negative timestamps, though behavior can vary on 32-bit platforms.

---

Source: https://vastcalc.com/calculators/conversion/unix-time
Category: Conversion
Last updated: 2026-04-08
