Skip to content
ENExplore Calculators

Samples/sec Calculator

Calculate training throughput in samples processed per second.

About Samples/sec Calculator

Training throughput in samples per second is the most direct measure of how fast a model trains: samples/s = batch_size / step_time_seconds. This figure directly determines how long a full epoch takes (steps_per_epoch × step_time), and is the metric most sensitive to hardware, batch size, model architecture, and data pipeline efficiency. Comparing samples/sec across different batch sizes or hardware configurations is the most practical way to evaluate real-world training speed improvements from optimizations like mixed precision, gradient checkpointing, or hardware upgrades.

Formula

samples_per_second = batch_size / step_time_seconds

batch_size
Number of samples per training step
step_time_seconds
Wall-clock time per step in seconds

Worked example

With the default values below, Samples/sec Calculator returns Throughput of 301.18. Change any input above and every figure here is recalculated in your browser.

Inputs used

Batch Sizeaccepts 1–1,000,000 samples
256 samples
Time per Stepaccepts 0–1,000,000 seconds
0.85 seconds
Dataset Size (optional)accepts 0–1,000,000,000,000 samples
1,000,000 samples

Results

Throughput
301.18 samples/s
Steps per Epoch
3,907
Estimated Time per Epoch
55.35 minutes

Step by step

  1. 1Samples/sec: batch size ÷ step time= 301.18 samples/s
  2. 2Steps per epoch: ⌈dataset size ÷ batch size⌉= 3,907
  3. 3Epoch time: steps per epoch × step time= 55.35 min

Assumptions and limits

  • The result is derived only from the 3 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to 2 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

Why does increasing batch size sometimes increase samples/sec and sometimes not?

Larger batches improve GPU utilization up to a point (better parallelism per step), increasing samples/sec, but beyond the point where the GPU is already compute-saturated, step time grows roughly proportionally with batch size, causing samples/sec to plateau rather than keep increasing.

How do I use samples/sec to estimate total training time?

Divide your total training samples (dataset size × number of epochs) by samples/sec to get total training time in seconds — this is the same calculation used by the Training Time Calculator, just expressed through throughput instead of step count.

Does samples/sec account for multi-GPU training?

If step_time_seconds is measured for the full multi-GPU setup processing one global batch, then samples/sec already reflects the combined throughput of all GPUs — just ensure batch_size refers to the full global batch, not the per-GPU micro-batch, to avoid underestimating throughput.

Samples/sec Calculator | Calcrivo