Predict the hardware cost vs gross margin for serving $15/M output tokens on H100
A provider prices output tokens at $15 per 1M for a Llama-70B-class model on H100. Assume the realistic production decode setup: - H100 hourly rental: $5/hr (spot-equivalent) - Achievable decode throughput at moderate batch (~10 concurrent users): ~150 tokens/second per H100 - Output tokens are billed at $15/M, no input tokens for this calculation Compute: 1. Output tokens generated per H100 per hour 2. Hardware cost per million output tokens ($/M) 3. Gross margin (price - cost) per million output tokens 4. Gross margin percentage
At 150 tok/s and $5/hr, an H100 makes 540k tokens/hr, costing about $9.26/M. Selling at $15/M leaves roughly $5.74/M margin, near 38%.
Think of a GPU as a vending machine you rent for $5 an hour that spits out tokens. In one hour it can drop about 540,000 tokens. So the cost of each batch of a million tokens is your hourly rent divided by how many millions you produced that hour: $5 spread across 0.54 million tokens, which works out near $9.26 per million. You then sell that same million tokens for $15. The difference, about $5.74, is what you keep before everything else like staff and networking. As a fraction of the $15 price, that gain is roughly 38 cents on the dollar. Make the machine spit out tokens faster and your rent buys more product, so the kept fraction grows.
Detailed answer & concept explanation~8 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
4 min: tokens per hour via 3600 + cost per token as rental over throughput + margin and margin percent + sensitivity to throughput versus rental + what real costs this omits.
Real products, models, and research that use this idea.
- Together AI and Fireworks publish per-million token prices for Llama 4 class models that imply gross hardware margins in the 30 to 50 percent band.
- vLLM continuous batching routinely lifts decode tokens per GPU-second several fold over naive serving, directly compressing cost per token.
- DeepSeek V4 pairs Multi-head Latent Attention with fp8 KV cache to raise effective throughput per H100, improving the same margin arithmetic.
- NVIDIA H100 and B200 spot rentals on Modal, RunPod, and Lambda commonly sit near $2 to $6 per hour, the input to this cost-per-token calculation.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow does doubling decode throughput change the margin at the same $15 price?
QWhy is throughput a stronger margin lever than GPU rental price?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Treating GPU rental price as the main margin lever. The dominant knob is tokens per second per GPU; doubling throughput roughly doubles margin at the same selling price.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.