induwara.lk
induwara.lkAI · Machine Learning

LLM Training Time & Cost Calculator

Estimate how long, how many GPU-hours, and how many dollars it takes to train a language model. Enter parameters, tokens, GPU type and count — the tool applies the standard 6NDcompute law and a chosen GPU's throughput. Free, no signup, sources cited below.

By Induwara AshinsanaUpdated Jul 18, 2026
Estimate a training run6ND compute law
Cross-checked vs GPT-3
Load a known model
B

Total parameters, in billions. For MoE, use active params per token.

B

Total tokens seen during training, in billions (1000 B = 1 trillion).

Peak dense BF16/FP16 (no 2:1 sparsity) — NVIDIA Hopper, BF16 dense.

×

How many GPUs run in parallel. Assumes near-linear scaling.

%

Share of peak FLOPs actually used. 35–57% is typical for tuned runs.

$

Your cloud/rental rate. Set 0 if you own the hardware.

Wall-clock time
153.6 days
3,686 GPU-cluster hours
Total GPU-hours
29,491
Verified by independent formula
Estimated cloud cost
$73,727.67
Compute
486
petaflop/s-days
Total compute (FLOPs)
4.20 × 10²²
Aggregate throughput
3.16 × 10¹⁵ FLOP/s
across the H100 SXM cluster
Approx. throughput
75,352 tok/s

Same run on other GPUs

GPUTimeGPU-hoursCost
A100 80GB1 yr 122 d93,483$233,707.26
H100 SXMselected153.6 days29,491$73,727.67
H200 SXM153.6 days29,491$73,727.67
RTX 40902 yr 191 d176,768$441,919.19

Estimates use the compute law C = 6 × N × D (Kaplan et al. 2020; Hoffmann et al. 2022) with vendor peak-throughput datasheets. Real runs vary with model shape, parallelism, and framework — MFU is the knob that captures that.

How it works

Training compute is dominated by one quantity: the number of floating-point operations (FLOPs) needed to push every training token through the model, forward and backward. The widely-used approximation is C ≈ 6 × N × D, where N is the parameter count and Dis the number of training tokens. The factor 6 breaks down as 2 FLOPs for the forward pass and 4 for the backward pass, per parameter per token. This is the form established by Kaplan et al. (2020) and reused by DeepMind's Chinchilla paper (2022) as the standard way to budget a training run.

The calculator then turns that compute figure into time and money:

  1. Total compute. C = 6 × N × D FLOPs, with N and D converted from billions to absolute counts.
  2. Per-GPU throughput. achieved = peak × (MFU / 100). Peak comes from the GPU's dense BF16/FP16 datasheet rating (for example H100 SXM at 989 TFLOP/s). MFU — Model FLOPs Utilization — is the fraction of peak you actually sustain in practice.
  3. Cluster throughput. aggregate = num_gpus × achieved, assuming near-linear scaling. Very large clusters lose a few percent to communication, so treat this as an upper bound.
  4. Wall-clock time. t = C / aggregate seconds, then converted to hours and days.
  5. GPU-hours. gpu_hours = num_gpus × t / 3600 — the unit cloud providers bill. Notably this equals C / (peak × MFU) / 3600, independent of the GPU count, so the tool cross-checks the two formulas against each other.
  6. Cost. cost = gpu_hours × price_per_gpu_hour.
  7. Petaflop/s-days. C / (1e15 × 86400) — the standard unit for comparing runs against published models. GPT-3 famously came to ≈ 3,640.

Three assumptions are worth stating plainly. First, 6ND ignores attention and activation FLOPs, which are a small correction at these scales. Second, MFU is a user input because it depends on model shape, parallelism strategy, and framework — there is no single right value. Third, GPU scaling is assumed near-linear. These are the same caveats used by public estimators from EpochAI and MosaicML. The tool does not model VRAM feasibility or parallelism topology — see the related training-memory and mixture-of-experts calculators for those.

Worked examples

Llama-style 7B on 1T tokens (256× H100)

  1. C = 6 × 7e9 × 1e12 = 4.2e22 FLOPs
  2. Achieved/GPU = 989 TFLOP/s × 45% = 4.45e14 FLOP/s
  3. Aggregate = 256 × 4.45e14 = 1.139e17 FLOP/s
  4. Time = 4.2e22 / 1.139e17 = 3.69e5 s ≈ 4.27 days
  5. GPU-hours = 256 × 3.69e5 / 3600 ≈ 26,214
  6. Cost at $2.50/hr ≈ $65,500

GPT-3 175B on 300B tokens (1024× A100) — cross-check

  1. C = 6 × 175e9 × 300e9 = 3.15e23 FLOPs
  2. Petaflop/s-days = 3.15e23 / (1e15 × 86400) = 3,646
  3. → matches OpenAI's published ~3,640 PF-days ✓
  4. Achieved/GPU = 312 TFLOP/s × 40% = 1.248e14 FLOP/s
  5. Time = 3.15e23 / (1024 × 1.248e14) ≈ 28.5 days
  6. GPU-hours ≈ 701,000; cost at $1.50/hr ≈ $1.05M

Edge case — 500M model, 1B tokens, single RTX 3090 at 100% MFU

  1. C = 6 × 0.5e9 × 1e9 = 3e18 FLOPs
  2. Achieved = 71 TFLOP/s × 100% = 7.1e13 FLOP/s (1 GPU)
  3. Time = 3e18 / 7.1e13 = 42,254 s ≈ 11.7 hours
  4. GPU-hours ≈ 11.74; cost at $0/hr = $0 (owned hardware)
  5. Throughput ≈ 23,666 tokens/second
  6. Shows sub-day runs and the free-hardware case cleanly

Frequently asked questions

Sources & references

GPU throughput figures and the compute formulas on this page were last cross-checked against the sources above on 2026-07-18. All GPU numbers are dense (no 2:1 sparsity). No live pricing is fetched — the cost-per-GPU-hour field is a user input so your own quote drives the estimate.

Related tools

Rate this tool
Be the first to rate

Comments & feedback

Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.

Found a bug, edge case, or want to suggest an improvement?

Email me at [email protected] — most fixes ship within 24 hours.