Epoch Time Calculator
From Per-Batch Speed to Total Training Time
A quick benchmark of "how many seconds does one batch take" is easy to measure, but the number that actually matters for planning — total training wall-clock time — requires multiplying that out across every batch in every epoch. This calculator does that scaling for you, converting a per-batch timing into hours, minutes, and seconds for the full run.
The Formula
Batches per Epoch = ceil(Dataset Size / Batch Size)
Epoch Time = Batches per Epoch × Time per Batch
Total Time = Epoch Time × Number of Epochs
Epoch Time = Batches per Epoch × Time per Batch
Total Time = Epoch Time × Number of Epochs
Worked Example
| Step | Calculation | Result |
|---|---|---|
| Batches per epoch | ceil(50,000 / 32) | 1,563 |
| Time per epoch | 1,563 × 0.15s | 234.45s (3m 54.4s) |
| Total training time | 234.45s × 10 epochs | 2,344.5s (39m 4.5s) |
Where This Matters
- Cloud budgeting — total training hours feeds straight into GPU rental cost, so an accurate time estimate avoids budget surprises mid-run.
- Scheduling experiments — knowing a sweep of 10 hyperparameter configurations will take roughly 6.5 hours total lets you plan around it rather than checking back repeatedly.
- Spotting a slow data pipeline — if the measured time per batch is far higher than expected for the batch size and hardware, it often points to a bottleneck in data loading rather than the model itself.
How to Use This Calculator
- Enter the Dataset Size (samples).
- Enter the Batch Size (samples).
- Enter the Time per Batch (seconds), measured from a short benchmark run.
- Enter the Number of Epochs planned (defaults to 1).
- Select Calculate to see batches per epoch, time per epoch, and total training time.
Related Calculations
Turn the resulting hours into a dollar figure with the Training Cost Calculator, or check batch size options with the Batch Size Calculator.