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

Worked Example

50,000 samples, batch size 32, 0.15s per batch, 10 epochs
StepCalculationResult
Batches per epochceil(50,000 / 32)1,563
Time per epoch1,563 × 0.15s234.45s (3m 54.4s)
Total training time234.45s × 10 epochs2,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

  1. Enter the Dataset Size (samples).
  2. Enter the Batch Size (samples).
  3. Enter the Time per Batch (seconds), measured from a short benchmark run.
  4. Enter the Number of Epochs planned (defaults to 1).
  5. 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.