Duration / Time Calculator
Convert between milliseconds, human-readable durations, ISO 8601 (P1DT2H30M), and HH:MM:SS formats. Calculate time breakdowns for timeouts, TTLs, and intervals.
Your data never leaves your browser
Available via MCP
Enter a duration and click Convert
Accepts: milliseconds (90000), human (2h 30m 15s), ISO 8601 (P1DT2H30M), time (01:30:00)
How to Use
- Enter a duration in any format:
90000(ms),2h 30m,P1DT2H30M, or01:30:00. - Click Convert to see all equivalent formats.
- Copy results with the Copy button.
Common Duration Values
- 1 minute — 60,000 ms
- 1 hour — 3,600,000 ms
- 1 day — 86,400,000 ms
- 1 week — 604,800,000 ms
- 30 days — 2,592,000,000 ms
Developer Use Cases
- Cache TTL — Redis EXPIRE, HTTP Cache-Control max-age
- JWT expiration — token lifetime in seconds
- Rate limiting — window size in milliseconds
- Database timeouts — connection and query timeouts
- Cron intervals — time between scheduled jobs
Related Tools
Convert Unix timestamps with the Epoch Converter. Convert date formats with the Date Converter. Build cron expressions with the Cron Generator. Evaluate math expressions with the Math Evaluator. Calculate byte sizes with the Byte Calculator.
Frequently Asked Questions
- What input formats are supported?
- Milliseconds (90000), human-readable (2h 30m 15s), ISO 8601 durations (P1DT2H30M), time notation (01:30:00), and simple units (30s, 5m, 2h, 1d, 1w).
- What is ISO 8601 duration format?
- ISO 8601 durations use the format PnYnMnDTnHnMnS. P is the duration designator, T separates date and time parts. Examples: P1D = 1 day, PT2H30M = 2 hours 30 minutes, P1DT12H = 1 day 12 hours.
- How is this useful for developers?
- Converting between duration formats is needed for configuring timeouts, TTLs, rate limits, cron intervals, cache expiration, JWT token lifetimes, and database connection pool settings.
- Is my data safe?
- Yes. All calculations happen entirely in your browser. No data is sent to any server.
Use this tool from AI agents.
The CodeTidy MCP Server lets Claude, Cursor, and other AI agents
use this tool and 46 others directly. One command: npx @codetidy/mcp