induwara.lkinduwara.lk
induwara.lkAI · LLM pricing

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.

By Induwara AshinsanaUpdated Jun 5, 2026
Estimate your fine-tuning cost
Rates verified · 300 LKR/USD
Examples

Cheapest to fine-tune; best default for most tasks.

Passes over the training file (1–20)

Tokens in your JSONL file

Editable; defaults to the CBSL indicative rate

Prompt tokens you expect to serve per month

Completion tokens you expect to serve per month

Training (one-time)
$4.32
≈ Rs 1,296 · 1,440,000 train tokens
Monthly inference
$1.20
≈ Rs 360 / month
First-month total
$5.52
≈ Rs 1,656 (training + 1 mo)
Fine-tuned premium
+$0.60/mo
vs base $0.60/mo

Base vs fine-tuned · monthly inference

VariantIn ($/1M)Out ($/1M)Monthly cost
Base (un-tuned)$0.15$0.60$0.60
Fine-tunedyour model$0.30$1.20$1.20
Premium for fine-tuning+$0.60(100%)

Breakdown & 12-month cumulative

Training · $3.00/1M × 1,440,000 tokens$4.32Rs 1,296
Inference · input ($0.30/1M)$0.60Rs 180
Inference · output ($1.20/1M)$0.60Rs 180
First-month total$5.52Rs 1,656
Cumulative cost — training amortised over 12 months
Mo 1
$5.52
Mo 2
$6.72
Mo 3
$7.92
Mo 4
$9.12
Mo 5
$10.32
Mo 6
$11.52
Mo 7
$12.72
Mo 8
$13.92
Mo 9
$15.12
Mo 10
$16.32
Mo 11
$17.52
Mo 12
$18.72

Rates are illustrative reference figures — not live quotes — sourced from OpenAI and Together AI, last re-confirmed on build day. Provider pricing changes — confirm the live rate before you commit. The MB→tokens path is an estimate (4 characters ≈ 1 token); use the token-counter tool for an exact count.

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

GPT-4o mini · 480,000-token file · 3 epochs · 2M in / 0.5M out per month

  1. Training tokens: 480,000 × 3 = 1,440,000
  2. Training cost: $3.00 × 1,440,000 ÷ 1,000,000 = $4.32 (≈ Rs 1,296)
  3. Inference input: $0.30 × 2,000,000 ÷ 1,000,000 = $0.60
  4. Inference output: $1.20 × 500,000 ÷ 1,000,000 = $0.60
  5. Monthly inference: $0.60 + $0.60 = $1.20
  6. First-month total: $4.32 + $1.20 = $5.52 (≈ Rs 1,656)
  7. Base model would be $0.60/mo → fine-tuned premium is $0.60/mo

GPT-4o · 500,000-token file · 4 epochs · 1M in / 0.5M out per month

  1. Training tokens: 500,000 × 4 = 2,000,000
  2. Training cost: $25.00 × 2,000,000 ÷ 1,000,000 = $50.00
  3. Inference input: $3.75 × 1,000,000 ÷ 1,000,000 = $3.75
  4. Inference output: $15.00 × 500,000 ÷ 1,000,000 = $7.50
  5. Monthly inference: $3.75 + $7.50 = $11.25
  6. First-month total: $50.00 + $11.25 = $61.25 (≈ Rs 18,375)
  7. Base GPT-4o would be $7.50/mo → fine-tuned premium is $3.75/mo

Edge case — zero monthly usage and the smallest possible run

  1. GPT-4o mini, 480,000 tokens, 3 epochs, but 0 input and 0 output tokens:
  2. Training cost stays $4.32; monthly inference is $0.00; the 12-month curve is flat.
  3. A 1-token file at 1 epoch costs $3.00 × 1 ÷ 1,000,000 = $0.000003 → shown as under $0.01.
  4. Enter 0 epochs, a negative file size, or a 0 exchange rate and the tool returns a specific error instead of a misleading $0 or NaN.

Frequently asked questions

Sources & references

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

Rate this tool
Be the first to rate

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.