Fine-Tuning Cost Calculator
Inputs
| Dataset size | 10 |
|---|---|
| Epochs | 3 |
| Price per million tokens | 8 $ |
Fine-Tuning Cost Calculator
Estimate the cost of a managed LLM fine-tuning job from the dataset size in millions of tokens, the number of epochs, and the provider’s price per million training tokens.
Inputs
Fine-tuning job
Results
Enter a value to see results.
Details
Fine-Tuning Cost
Managed fine-tuning APIs bill by the work performed, which is simply the number of training tokens the model reads. Because that number is the dataset size multiplied by the number of passes over it, the cost of a fine-tuning job can be read off before the job starts. This calculator estimates it from the dataset size in millions of tokens, the number of epochs, and the provider's price per million training tokens.
How fine-tuning is billed
Rather than exposing the underlying hardware, a managed fine-tuning service charges for the tokens processed during training. One epoch reads every token in the dataset once; running several epochs reads the whole dataset that many times. The total tokens billed is therefore the dataset size times the epoch count, and the bill is that total times the per-token rate the provider quotes. This makes the cost predictable from the dataset alone, without knowing the GPU type, the batch size, or how long the job runs.
The formula
With a dataset of million tokens, epochs, and a price per million tokens, the total tokens processed and the total cost are
MC=D⋅e=M⋅pBoth the dataset size and the price are expressed per million tokens because that is the unit most providers quote. The cost is linear in every input: doubling the dataset, doubling the epochs, or doubling the rate each doubles the bill.
Worked example
Take a dataset of 10 million tokens trained for 3 epochs at a rate of 8.00 per million tokens:
MC=10×3=30 million tokens=30×8.00=240.00The job processes 30 million tokens and costs 240. Trimming to two epochs would process 20 million tokens and cost 160, while keeping three epochs but using a model with a 4.00 rate would halve the bill to 120. Because the token count is the same across pricing tiers, the choice of base model and training method shows up entirely in the per-million rate.
Limits
The estimate counts only the training tokens of the dataset across the chosen epochs. It excludes validation tokens if the provider bills them separately, the cost of preparing and cleaning the data, and any charge to host the resulting model. Full fine-tuning that updates every weight is usually priced above adapter methods such as low-rank adaptation, so the rate entered should match the method actually chosen. For jobs run on rented hardware rather than a managed API, the bill follows GPU-hours instead of tokens. The per-token economics of using the resulting model are covered in the Token Cost Calculator, and the rental side of self-managed training in the GPU Cloud Cost Calculator.
Frequently Asked Questions (FAQ)
What drives the cost of a fine-tuning job?
The bill is the number of tokens processed times the price per million, and the tokens processed are the dataset size multiplied by the number of epochs. Larger datasets and more passes both raise the count linearly.
The per-token rate depends on the base model — larger models cost more per token — and on the training method, since full fine-tuning that updates every weight is typically priced above adapter methods that train a small fraction of the parameters. Validation tokens, if billed, add to the total.
Why is fine-tuning priced per token rather than per hour?
Managed fine-tuning APIs hide the hardware and charge for the work performed, which is proportional to the tokens the model reads during training. Per-token pricing makes the cost predictable from the dataset alone, without needing to know the GPU type, batch size, or wall-clock time. If instead the work is run on rented hardware, the bill follows GPU-hours rather than tokens, and the relevant figures are the cluster size and the run duration.
Is full fine-tuning more expensive than adapter methods?
Usually yes. Full fine-tuning updates every parameter and requires storing optimizer state for all of them, so providers price it higher per token than parameter-efficient methods such as low-rank adapters, which train a small added set of weights and freeze the rest. Adapter methods also produce far smaller artifacts to host.
The token count processed is the same for a given dataset and epoch budget, so the difference shows up entirely in the per-million-token rate entered here.
Disclaimer
This estimate assumes per-token billing of the dataset across the chosen number of epochs and excludes validation tokens, data preparation, and hosting of the resulting model unless those are folded into the per-million rate. Provider pricing and token counting vary; confirm rates with the provider before budgeting.