AI API Pricing

Fine-Tuning Cost Calculator

Estimate the one-time training cost of fine-tuning an LLM on your own dataset, and compare rates across model tiers.

Fine-tuning trains a model on your own examples so it doesn't need the instructions repeated in every prompt, but the training run itself is billed per token — every example in your dataset gets processed once per epoch, and epochs typically run 3 or more times over the full dataset. This calculator estimates that one-time training cost from your example count, average example length, and epoch count, and compares it across the model tiers providers currently open to fine-tuning.

Each epoch processes your full dataset once. 3–4 epochs is a common default.

Training Cost

$7.20

Total Training Tokens

900,000

One-time training cost. Inference on the resulting fine-tuned model is billed separately, usually at a surcharge over the base model's standard rate.

ModelProviderTraining Rate (1M tokens)Total Training Cost
DeepSeek V3.2DeepSeek$1.50$1.35
Gemini 3.1 FlashGoogle$4.00$3.60
GPT-5.2 NanoOpenAI$8.00$7.20
Claude 4.6 HaikuAnthropic$10.00$9.00

How to Use This Calculator

1. Enter your training example count

The number of input/output pairs in your fine-tuning dataset.

2. Enter average tokens per example

Combined length of a typical input and its expected output.

3. Set your epoch count

How many full passes over the dataset the training run will make. 3–4 is a common default.

4. Choose a model and read the training cost

Compare the same dataset's cost across every model tier in the table below.

How It Works

(example_count × avg_tokens_per_example × epochs / 1M) × training_rate

1,000 examples at 300 tokens each, trained for 3 epochs, is 900,000 tokens. At $8.00/1M tokens, that's a $7.20 total training cost.

Frequently Asked Questions

How is fine-tuning priced differently from regular API usage?

Regular API usage bills you per token for each request at inference time. Fine-tuning adds a separate, one-time training cost billed per token processed during the training run, in addition to the (usually higher) per-token inference rate you'll pay afterward to use the fine-tuned model.

What counts as one epoch?

One epoch is one complete pass of your training dataset through the model. Training for 3 epochs means every example in your dataset is processed 3 times, which triples the total training tokens billed compared to a single pass.

Does a larger dataset always produce a better fine-tuned model?

Not necessarily past a certain point — dataset quality and consistency generally matter more than raw size. A smaller, carefully curated dataset often outperforms a larger, noisier one, and costs less to train.

Is fine-tuning worth it compared to just writing a longer prompt?

It depends on your request volume. If you make relatively few requests, the ongoing cost of a longer prompt on the base model is usually cheaper than fine-tuning's upfront training cost. At high request volume, fine-tuning can pay for itself by shrinking the per-request prompt.

Common Mistakes

  • Comparing fine-tuning cost to prompting cost without counting requests saved

    Fine-tuning has an upfront training cost, but it can shrink your prompt on every subsequent request by removing instructions and examples the model no longer needs repeated. Compare training cost against the per-request savings multiplied by expected request volume, not against $0.

  • Using too few examples to justify the training cost

    Fine-tuning generally needs a meaningfully sized, high-quality dataset to reliably outperform a well-written prompt on the base model. A tiny dataset can cost more in training than it saves in reduced prompt length.

  • Forgetting that fine-tuned inference usually costs more per token than the base model

    Most providers charge a surcharge for running a fine-tuned model versus the base model it was built from. Factor that ongoing surcharge into the total cost comparison, not just the one-time training run.

Related Tools