AI Fine-Tuning Cost Calculator
Estimate what it costs to fine-tune an LLM — the one-time training charge and the ongoing monthly inference bill — from your training-file token count, epochs, and expected usage. Covers OpenAI GPT-4o, GPT-4o mini, GPT-3.5 Turbo and Together AI open models, in US dollars and Sri Lankan rupees.
How it works
The calculator is pure arithmetic over published per-token rates. It does not call any API or train a model — every figure comes from a rate table re-confirmed against the providers' pricing pages on the last-verified date below. Managed fine-tuning has two cost components, and the tool keeps them separate.
1. Training tokens
Training cost is driven by how many tokens are processed, which is your file size times the number of passes: training tokens = file tokens × epochs. OpenAI states this directly in its fine-tuning guide — the cost is based on the total tokens in the training file multiplied by the epoch count.
2. Training cost
Each model has a training rate in US dollars per 1,000,000 tokens, so training cost = rate × training tokens ÷ 1,000,000. For example GPT-4o mini at $3.00 per 1M and 1,440,000 training tokens is 3.00 × 1.44 = $4.32.
3. Monthly inference cost
Once the model exists, every call is billed per token, with separate input and output rates: (in-rate × input tokens + out-rate × output tokens) ÷ 1,000,000. This is the recurring number that dominates total spend at any real volume.
4. The fine-tuned premium
Fine-tuned models usually cost more per token than the base model. The tool prices the same monthly token mix on both and reports the difference, so you can see the premium you pay for a custom model. On OpenAI it is roughly double; on Together AI's serverless LoRA tier a fine-tuned model serves at the base rate, so the premium is zero.
5. First month, cumulative, and cross-check
The first-month total is training plus one month of inference; the 12-month curve is training + month × monthly inference, which shows the one-time training shrinking as a share of total spend. As an internal check, the training cost is recomputed with a per-1,000-token rate (rate ÷ 1000) × (training tokens ÷ 1000); the per-1M and per-1K methods agree to the cent. Every USD figure is converted to rupees at the editable rate, default 300 LKR per USD.
Worked examples
Frequently asked questions
Sources & references
- OpenAI — API pricing (fine-tuning training + inference $/1M tokens)
- OpenAI — Fine-tuning guide (training cost = rate × file tokens × epochs)
- Together AI — fine-tuning and serverless inference pricing
- Central Bank of Sri Lanka — indicative USD/LKR exchange rate
Per-model rates and the USD/LKR default were last re-confirmed against the sources above on 2026-06-05. Provider pricing changes — these are illustrative reference figures for budgeting and comparison, not live quotes. Confirm the live rate on the provider before you commit, and note the MB→tokens path is an estimate.
Related tools
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, a stale rate, or want another provider or model added?
Email me at [email protected] — most fixes ship within 24 hours.