Relative Time Calculator

Add or subtract a duration from a base date. Line 1: base date (or leave empty / type now for current time). Line 2: offset like +3 days, -2 weeks, or +1 months.

  • Runs entirely in your browser
  • No data stored or sent to a server
  • Free forever — no signup
  • Instant conversion

Input and Output

Use the interactive encoder and decoder on this page to process your text.

Learn more about relative time

Adding and Subtracting Time from a Date

Relative Time

When to Use Relative Offsets

Calculate future or past dates for token expiry, trial end dates, cache TTL debugging, scheduled job previews, and answering "what date is 90 days from now?"

Offset Format

Line 1: base date. Line 2: offset like +3 days, -2 weeks, or +90 minutes. Supported units include seconds, minutes, hours, days, weeks, months, and years.

Common Mistakes

  • Month arithmetic crossing month boundaries (Jan 31 + 1 month)
  • Forgetting timezone context on the base date
  • Using relative offsets where absolute UTC storage is required

Developer Tips

  • Use +7 days for week-based trials instead of manual date math
  • Verify month/year additions near month-end for billing logic
  • Combine with ISO 8601 parser to format output for APIs

Frequently asked questions

What offset units are supported?

Seconds, minutes, hours, days, weeks, months, and years. Prefix with + or - for forward or backward adjustment.

How are months and years calculated?

Months and years adjust the calendar date, which may land on a different day when crossing short months (e.g. Jan 31 plus 1 month).

Can I use the current time as the base?

Yes. Leave line 1 empty or use "now" to start from the current date and time.