Cost per million tokens calculator
Derive the cost of a million output tokens from GPU price, replica size, batch and context, using bandwidth-bound and compute-bound decode throughput estimates, or plug in your measured tokens per second.
Deployment
Traffic
- Bytes per step
- 141 GB weights + 64 × 1.3 GB KV = 227 GB
- Steps per second
- 13.4 TB/s ÷ bytes per step = 59.0
- Bandwidth-bound tok/s
- steps/s × 64 = 4k
- Compute-bound tok/s
- 4 × 989e12 × 60% ÷ (2 × 70.6B) = 17k
- $ per M tokens
- ($10.00 ÷ 3600) ÷ (4k × 60%) × 1e6 = $1.226
Prefill is charged separately in practice and is compute-bound, so input tokens cost less per token at long prompts than this decode figure. Weights in 2 B/param; KV kept in bf16.
What the interviewer is actually asking
Neoclouds and serving startups ask for the dollars-per-token math because it is where every serving decision cashes out: batch size, quantization, tensor-parallel degree and utilization all change the number by multiples. The interviewer wants the mechanism, bandwidth-bound decode turning compute-bound as batch grows, not a price they can look up.
Questions people ask
Each decode step streams the active weights once plus every sequence's KV cache, and produces one token per sequence. Divide aggregate memory bandwidth by bytes per step for steps per second, multiply by batch for tokens per second, and cap at the compute-bound rate of peak FLOPS divided by two FLOPs per active parameter.
