chris-prod, from main, at llmopex.com.chris-dev, from branch chris-dev, at dev.llmopex.com.tools.py) with a test.other, never guessed.Every number on every page is computed in one module, tools.py (with pricing/egress.py and pricing/benchmarks.py), and tested. These are the formulas, with their constants and a worked example. Prices are list prices; a month is 730 hours for hourly options and 30 days for per-token volumes unless a "days" setting says otherwise.
Bytes per weight: fp32 4 · fp16 2 · bf16 2 · fp8 1 · int8 1 · int4 0.5 (MXFP4 and NVFP4 count as int4). Overhead is the KV-cache and activation allowance: 25% by default, adjustable on the Fit page.
An instance fits when VRAM ≤ GPU count × memory per GPU. A model larger than one GPU is offered only on instances whose GPUs are joined by NVLink, NVSwitch or Infinity Fabric. When nothing fits, shortfall = needed − largest instance.
Example: 120B at int4 = 120 × 0.5 × 1.25 = 75 GB; 70B at fp16 = 70 × 2 × 1.25 = 175 GB.
With a use case (Chat, RAG, Agents, Summarise and batch, or your own numbers) the flat allowance is replaced by a worked one, when the model's architecture is known:
VRAM = weights × 1.10 + KV cache KV cache (GB) = bytes per token × tokens kept × requests at once ÷ 10⁹ bytes per token and layer = 2 × KV heads × head size × 2 (grouped-query attention) = (kv_lora_rank + rope dim) × 2 (DeepSeek's latent attention)The 1.10 is a working margin (activations, CUDA graphs, fragmentation); the 2 is bytes per cached value (16-bit). Layers that attend over a sliding window keep only the last window tokens, and the context is held to the model's own limit. The presets: Chat 8K × 16 · RAG 32K × 16 · Agents and coding 128K × 4 · Summarise and batch 16K × 32. A model whose layers and heads are not readable (a gated repository) keeps the flat allowance, and the page says so.
Example: gpt-oss-120b (36 layers, 18 full attention, 8 KV heads of 64) for RAG: 18 × 2 × 8 × 64 × 2 = 36,864 bytes a token × 32,768 × 16 ≈ 19.4 GB of KV cache, so 58.4 × 1.10 + 19.4 = 83.7 GB, which no longer fits one 80 GB GPU.
Defaults: 30 days, 2,000,000 output tokens a day, ratio 3. The chart's per-token line is cost(t) = t × ($out + ratio × $in) ÷ 10⁶ for t output tokens a month: a straight line.
Example: 2M out/day, ratio 3 → 6M in/day → 180 × $in + 60 × $out a month (with $in and $out per 1M).
from tasks: calls/day = tasks/day × calls a task × (1 + retried) input/day = calls/day × prompt tokens · output/day = calls/day × answer tokens ÷ (1 − reasoning share)"Set from tasks" turns a count of work into the two sliders. A use case fills the figures with its assumptions (Chat: one call of 1,500 in and 300 out; RAG: 6,000 and 400; Agents and coding: 6 calls of 12,000 and 800 a task, 40% of the output reasoning the user never sees but pays for, 10% of calls retried; Summarise: 8,000 and 400), every one of them editable; the line under the sliders says what was assumed. "Upload a usage export" reads the tokens a bill states per model (OpenAI and Anthropic exports; Azure cost analysis with its unit of measure; AWS usage types; Google Cloud billing SKUs with their unit, characters converted at 4 a token; OCI cost reports by SKU description and unit; Alibaba Model Studio bills, the model and direction read from the instance id; Snowflake Cortex usage views; OpenRouter, LiteLLM, Langfuse and Helicone exports. Where a vendor meters input and output together — Oracle's transactions, Snowflake's TOKENS — the figure is split 3:1 and the row says so; a billed name is also tried without its date suffix and with dotted versions, and the row says which spelling matched), divides by the days the file's dates span (or the days you give), and sets the model and the sliders to one line of it; the file is read in memory and never stored.
Example: 1,000 agent tasks a day → 6,600 calls → 79.2M input and 8.8M output tokens a day (800 visible + 533 reasoning per call), against 0.3M output had it been priced as chat.
Rows are grouped by region and service tier; only groups that price both directions compete, so input and output always come from the same region and tier. Cached-input and batch prices come from the chosen group, else the cheapest accepted row. Characters are converted at 4 per token ($/1M = price × 10⁶ ÷ tokens per unit; 10,000 characters = 2,500 tokens). A cloud with no price in the chosen region is "not sold there", never priced from another.
Example: $0.0010 per 10,000 characters = 0.001 × 10⁶ ÷ 2,500 = $0.40 per 1M tokens.
busy is the GPU busy time you set (50% by default) for self-hosting, and 100% for a dedicated cluster, which is sold as capacity. The chart draws an hourly option as a staircase: n × $/hour × 730 × days/30 + egress, where n steps up each time the volume outgrows one instance.
The instance chosen is the cheapest that fits, one per instance type at its cheapest region. A 0.5× / 1× / 2× throughput band is shown beside each self-hosted figure.
Example: 2,500 tokens/s at 50% busy = 2,500 × 3,600 × 730 × 0.5 = 3.285 × 10⁹ tokens a month per instance.
tokens/s = per-group tokens/s × ⌊GPUs ÷ tensor-parallel⌋.size = parameters, or √(active × total) for mixture-of-experts), beyond them per GPU = ref × size_ref ÷ size; a precision factor have ÷ want bytes; a GPU not measured is scaled from the H100 by bandwidth ÷ 3,350 GB/s; total = per GPU × GPU count.The rate is Oracle's single "AI Unit Per Hour" meter for the vendor; an imported model uses the "Model Import" meter. The monthly figure then follows formula 4 with busy = 100%. Oracle's 744 unit-hour minimum commitment on pretrained clusters is shown on the card; it is not part of the monthly arithmetic. Imported models carry none. The suggested shape is Oracle's minimum import shape, else the cheapest published shape, else the cheapest that passes the memory rule.
B (bytes per output token) and E (response envelope): streamed 200 and 1,500 · text 5 and 1,000 · same region 0 and 0. One request per 2,000 input tokens, so requests = input tokens ÷ 2,000. The Calculator's tick box uses streamed.
Tiers are cumulative and the free allowance is a $0 first tier: AWS 100 GB, Azure 100 GB, OCI 10 TB (10,240 GB), Alibaba 200 GB, Google about 1 GB; Nebius charges nothing for traffic out. Core42, Telnyx, Snowflake, Cloudflare, Databricks, the Gemini API, xAI, Mistral, OpenAI and Anthropic sell per token and publish no egress price. The zone is the one the region belongs to; with "anywhere" it is the zone that costs least at that volume, and a dedicated cluster is limited to the zones its shape is sold in.
Egress is added to self-hosted and dedicated-cluster options only. Per-token endpoints are billed per token and carry none.
Example: streamed, 60M output tokens a month, ratio 3 → 200 + 3 × 1,500 ÷ 2,000 = 202.25 bytes per token → 12.1 GB (as text: 6.5 bytes, 0.39 GB).
With egress the crossing is found by bisection (80 steps; the search widens ×4 up to 10¹⁶ tokens). If the egress a token causes costs more than its per-token price there is "no break-even". On the chart, 90 log-spaced volumes from 10⁵ to 10¹² tokens a month are priced (the axis widens a decade past your workload when it falls outside); the winner at each is the cheapest (ties go to the lower option); where the winner changes the volume is refined by 40 bisections. A staircase step can therefore appear as a break-even.
Margin: runner-up cost − winner cost at your workload.
Each vendor has one choice: any (the cheapest region), in-country (the UAE) or in-country:XX (another country), or one region id. In country accepts only that vendor's regions in the country (UAE: AWS me-central-1 · Azure uaenorth, uaecentral · OCI me-dubai-1, me-abudhabi-1 · Core42 uae · Alibaba me-east-1 · Telnyx me-central-1 (Dubai, for the models it serves there) · Google none · Nebius none · Snowflake none (its UAE regions send model calls abroad) · Cloudflare none · Databricks none (UAE North's model calls are processed in the EU) · Hugging Face Endpoints none · IBM watsonx none · Together AI none · Crusoe none (its regions are in Europe, the US and Israel) · the Gemini API, xAI, Mistral, OpenAI and Anthropic none: each has one price for every region and names no country, so held to a country it is not sold). The country comes from a hand-written region-to-country table; on Opex it is found in the browser from the time zone (nothing is sent) and you can change it.
OCI prices are global, so whether it sells a model in a country is Oracle's documentation's call: a region named for that country or one of its cities.
Weights: price cut or rise 60 · model added 55 · retirement 50 · announcement 30. Bonuses: +10 it reaches the UAE regions, and for a retirement +15 within 30 days, +5 within 90, +10 if the app prices the model.
What it means in money: an hourly meter is price × 730; a per-token meter is per-day tokens × 30 ÷ 10⁶ × price at the default workload. Withdrawn is reported only when a row is in an older snapshot and missing from both of the two newest: one skipped collection is not news. A snapshot missing a whole section is kept aside as partial. A retirement is shown only with a firm date, today or later.
Month m of the period (1 to 60 months) has the volume Vm = V1 × (1 + g)m−1, where g is the growth a month. Given a volume to reach by the last month instead, g = (Vend ÷ V1)1 ÷ (months − 1) − 1. Each month is then priced exactly as the cards are, at that month's volume: a per-token option at tokens × price, an hourly option at ⌈tokens ÷ capacity per instance⌉ whole instances for 730 hours, with egress on that month's volume.
The total is the sum of the months. "Another instance from month m" is the first month the ceiling rises. The cheapest over the period is the lowest total; the month the cheapest changes is where the lowest monthly cost passes from one option to another. Example: 2M output tokens a day growing 5% a month reaches 6.1M a day in month 24. Prices are today's list prices in every month: nothing is projected. On Compare the workload is the Calculator's starting one; on Fit there is no volume, so the figure is one instance × 730 hours × the months.
Busy is the Calculator's busy time (step 2): the share of each hour the tokens arrive in, so the capacity bought is sized for that share. AWS's reserved tier is read from its price list per 1K tokens a minute per hour, input and output separately, for one or three months, global or within the geography. Azure's PTUs follow Microsoft's own sizing page (input TPM per PTU and the output-to-input ratio per model, copied by hand with its date) at the PTU meter of the deployment type the place calls for: the hourly meter with no commitment, or for a 1-month (or 3-month, which Microsoft does not sell: the row says so) term Microsoft's 1-month reservation, one price per PTU for the whole month whatever the model, written per hour over 730 hours; its 1-year reservation is read and named beside it. Oracle's cluster is the option table's, at Oracle's measured throughput; the table sizes it as posted (100% busy), here busy applies to every vendor alike. On demand is the vendor's own standard per-token price for the same tokens. Egress is not added. Google's GSUs and Databricks' provisioned throughput are not priced yet and the panel says so.
Example: 10M output tokens a day, 3:1, 50% busy → 41,667 in + 13,889 out tokens a minute. AWS at $0.18 and $0.90 per 1K TPM hour → $7.50 + $12.50 = $20.00 an hour → $14,600 a month. Azure gpt-4o: (41,667 + 4 × 13,889) ÷ 2,500 = 38.9 → 40 PTU × $1.00 → $29,200.
$/hour × 730, wherever an instance is shown with a monthly figure.output tokens/day × days × ratio.(input tokens × rate_in + output tokens × rate_out) ÷ 10⁶ at OCI's $0.15 / $0.60 per 1M.