induwara.lk
induwara.lkAI · Developer tools

AI API Budget Calculator — how many tokens and requests your money buys

Enter a dollar budget, pick a model, and describe an average request. This tool inverts the usual cost formula to show how many API requests, tokens, words, and pages you can afford — how long it lasts, and what it's worth in rupees. No signup, no network calls.

By Induwara AshinsanaUpdated Jul 1, 2026
How far does my budget stretch?
List prices · verified Jun 2026
$

A free trial credit, a monthly spend cap, or a leftover balance.

Common budgets

Prices shown are input/output USD per 1M tokens.

req

Used only for the “runs out in N days” line. Leave blank to skip.

tok

Prompt size: system + user + any context.

tok

How much the model writes back per call.

Rs

CBSL indicative rate — edit to today's value.

Requests you can afford
13,333
Total tokens
13,333,000
6,666,500 in · 6,666,500 out
≈ Words / pages
10,024,812
≈ 20,050 A4 pages
Runs out in
266 days
Comfortably covers a month

Cost breakdown

Cost per request$0.0004Rs 0.11
— Input portion$0.0001Rs 0.02
— Output portion$0.0003Rs 0.09
Budget value$5.00Rs 1,500

Text tokens only. Excludes prompt caching, batch discounts, and image/audio pricing — those have dedicated calculators linked below.

Same budget, cheaper models

The models that buy the most requests for the same money and request shape. Tap a row to recalculate for that model.

Model$ / requestRequestsvs picked
OpenAI$0.000222,222+66.67%
Google$0.000320,000+50%
pickedOpenAI$0.000413,333
Meta (Together AI)$0.000412,987-2.6%
Vendor list prices snapshotted on 2026-07-01 — not a live feed.

How it works

Every large-language-model API prices two things separately: the input tokens you send (your prompt, system message, and any context) and the outputtokens the model writes back. Prices are quoted in US dollars per 1,000,000 tokens, and output is almost always dearer than input because the model spends compute generating each token. This calculator reads those published per-million prices from the same shared table used by the site's AI API Cost Calculator, so the two tools never disagree.

Most cost calculators go usage → cost. This one runs the arithmetic backwards — budget → capacity — in six steps:

  1. Cost per request. Creq = (Tin ÷ 1,000,000 × Pin) + (Tout ÷ 1,000,000 × Pout) where Tin/Tout are your average input/output tokens and Pin/Poutare the model's per-million prices.
  2. Requests affordable. Nreq = floor(Budget ÷ Creq). We floor to whole requests — you can't buy a fraction of a call — with a tiny epsilon guard so exact-multiple budgets (say a budget that divides evenly into 100 requests) don't drop to 99 through floating-point rounding.
  3. Total tokens. Ttot = Nreq × (Tin + Tout), split back into input and output shares.
  4. Words. Using OpenAI's rule of thumb of about 1.33 tokens per English word, Words = round(Ttot ÷ 1.33).
  5. Pages. At roughly 500 words per A4 page, Pages = round(Words ÷ 500).
  6. Runway. If you enter requests per day R, Days = floor(Nreq ÷ R). Any dollar figure is multiplied by your USD→LKR rate for the rupee lines.

There is no opinion or estimation model here — just arithmetic over authoritative published prices. As an independent check, the tool re-derives the cost per request through a per-1,000-token unit instead of the per-1,000,000-token path and confirms both produce the same number of affordable requests, the same way the site's tax calculator cross-checks itself against the IRD's monthly formula. The words and pages figures are approximations for human-scale framing; the request, token, and dollar numbers are exact.

Worked examples

$5 OpenAI trial credit on GPT-4o mini

500 input + 500 output tokens · 50 requests/day

  1. Cost per request: 500/1M × $0.15 + 500/1M × $0.60 = $0.000375
  2. Requests: floor($5 ÷ $0.000375) = 13,333
  3. Total tokens: 13,333 × 1,000 = 13,333,000
  4. Words: 13,333,000 ÷ 1.33 ≈ 10,024,812 (≈ 20,050 A4 pages)
  5. Runway: floor(13,333 ÷ 50) = 266 days
  6. Budget value: $5 × 300 = Rs 1,500

$20/month self-funded cap on Claude Sonnet 4.6

2,000 input + 800 output tokens (chatbot with context) · 40 requests/day

  1. Cost per request: 2,000/1M × $3 + 800/1M × $15 = $0.018
  2. Requests: floor($20 ÷ $0.018) = 1,111
  3. Total tokens: 1,111 × 2,800 = 3,110,800
  4. Runway: floor(1,111 ÷ 40) = 27 days — comfortably covers a month
  5. Budget value: $20 × 300 = Rs 6,000

$300 Google Cloud credit on Gemini 2.5 Flash

1,000 input + 1,000 output tokens (spot-check, no daily volume)

  1. Cost per request: 1,000/1M × $0.30 + 1,000/1M × $2.50 = $0.0028
  2. Requests: floor($300 ÷ $0.0028) = 107,142
  3. Total tokens: 107,142 × 2,000 = 214,284,000 (≈ 214.3M)
  4. The cheaper-models table shows how much further a smaller Gemini tier stretches the same $300

Frequently asked questions

Sources & references

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, edge case, or want to suggest an improvement?

Email me at [email protected] — most fixes ship within 24 hours.