Epoch, Batch & Training Steps Calculator

Calculate steps per epoch, total training steps, warmup steps and effective batch size from dataset size, batch size, GPUs and gradient accumulation.

🔒 Processed locally in your browser — we don’t upload your input.

How to use the Training Steps

Training scripts for deep learning and LLM fine-tuning ask for numbers such as max steps, warmup steps, evaluation interval and save interval, but you usually think in terms of dataset size and epochs. This calculator converts between the two. Enter the number of training examples, the per-device batch size, the number of GPUs and the gradient accumulation steps, and it computes the effective batch size, steps per epoch and total optimizer steps for the epochs you plan.

It also suggests warmup steps from a warmup ratio (commonly 3–10%), and shows how many steps lie between evaluations or checkpoints if you want a fixed number per epoch. When the dataset does not divide evenly, the tool shows both the rounded-up value (keeping the last partial batch) and the rounded-down value (dropping it), matching the drop_last option in PyTorch and Hugging Face Trainer.

If you are fine-tuning on a token budget rather than examples, enter the average tokens per example to see total training tokens, useful for estimating cloud GPU time and provider fine-tuning fees. Combine it with the Learning Rate Scheduler to visualise the resulting schedule. All calculation is local.

Frequently asked questions

What is effective batch size?

Per-device batch × number of GPUs × gradient accumulation steps.

What is a step?

One optimizer update, which processes one effective batch.

How many warmup steps should I use?

A warmup ratio of 3–10% of total steps is common.

Does it match Hugging Face Trainer?

Yes, the formulas follow the same definitions; choose drop-last if you set dataloader_drop_last.

About this tool

Calculate steps per epoch, total training steps, warmup steps and effective batch size from dataset size, batch size, GPUs and gradient accumulation. People also look for: epoch calculator, training steps calculator, batch size calculator, gradient accumulation.

Related searches