← lh6tc Toolbox

Time Calculator

Calculate date offsets, date differences, time intervals, timestamps, period offsets, and K-line bar counts in one browser-based tool. All calculations run locally in your browser.

1. Calculate N days before / after a fixed date

Choose a date and enter N days from 0 to 1000. Select before, after, or both.

Example: fixed date 2026-06-03, N = 30. After: 2026-07-03; before: 2026-05-04.

2. Calculate days between two dates

Choose date A and date B. The result is B - A, so it can be negative.

Example: 2026-01-01 to 2026-02-01 is 31 days; reversed is -31 days.

3. Calculate the interval between two times

The input format changes with the selected unit. The result is B - A, so negative intervals are allowed.

Example: choose hours, A = 2025/01/01 00, B = 2025/01/02 12, result = 36 hours.

4. Calculate before / after by period and parameters

Set a fixed time, parameter A from 0 to 1000, and unit B: seconds, minutes, hours, days, weeks, months, or quarters.

Example: fixed time 2026-06-03 12:00:00, A = 2, B = weeks. Before: 2026-05-20 12:00:00; after: 2026-06-17 12:00:00.

5. Time / timestamp conversion

Convert 5 times to timestamps and 5 timestamps back to times at once. Times use the local timezone; timestamps can be seconds or milliseconds.

Example: convert 2026-06-03 12:00:00 to a Unix timestamp, or enter a timestamp to get local time.
Time
Timestamp

6. K-line bar count calculator

Enter time A and B, choose a candlestick period, and calculate how many complete bars are between B - A. If A is later than B, the result is negative.

Example: A = 2026-06-01 00:00:00, B = 2026-06-02 00:00:00, period = 1 hour, result = 24 bars.
Free online time calculation tool

Use this calculator for deadlines, billing cycles, project schedules, date differences, time durations, Unix timestamp conversion, and candlestick/K-line bar counting.