LLM cost calculatorPro
Works out what a workload costs per month: change tokens in and out, daily volume and caching, and eight models reorder by price while their bars slide to match the priciest.
oxyn add llm-cost-calculatorWhat will it cost a month?
150,000 requests · 225.0M input · 60.0M output a month
- 8Claude Opus 4.1$6,660
- 7Claude Sonnet 4.5$1,332
- 4Claude Haiku 4.5$444
- 5GPT-5$780
- 1GPT-5 miniCheapest$156
- 6Gemini 2.5 Pro$797
- 2Gemini 2.5 Flash$197
- 3Mistral Medium 3$210
Claude Sonnet 4.5 costs $1,332 a month, $0.0089 per request, 8.5x the cheapest (GPT-5 mini)
Sample list prices per 1M tokens; cached input billed at the cache rate. Cheapest first: GPT-5 mini.
The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.
Rendered from Rust at build time · goes live when visible
When to use
- Estimate monthly spend: set tokens per request, requests per day and the cache hit rate, and eight models re-rank by monthly cost.
When not to use
- Replays a multi-agent run on one clock: use Agent timeline instead.
- One model at a glance: use Model card instead.
- A small automation on a single rail: use AI workflow instead.
Installation
LLM cost calculator is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.
oxyn add llm-cost-calculatorUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Support chat
A support chat workload.
What will it cost a month?
150,000 requests · 225.0M input · 60.0M output a month
- 8Claude Opus 4.1$6,660
- 7Claude Sonnet 4.5$1,332
- 4Claude Haiku 4.5$444
- 5GPT-5$780
- 1GPT-5 miniCheapest$156
- 6Gemini 2.5 Pro$797
- 2Gemini 2.5 Flash$197
- 3Mistral Medium 3$210
Claude Sonnet 4.5 costs $1,332 a month, $0.0089 per request, 8.5x the cheapest (GPT-5 mini)
Sample list prices per 1M tokens; cached input billed at the cache rate. Cheapest first: GPT-5 mini.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Coding agent
A coding agent with heavy caching and the batch switch (Oxyn extra).
What will it cost a month?
24,000 requests · 960.0M input · 72.0M output a month
- 8Claude Opus 4.1$9,432
- 7Claude Sonnet 4.5$1,886
- 4Claude Haiku 4.5$629
- 5GPT-5$1,056
- 1GPT-5 miniCheapest$211
- 6Gemini 2.5 Pro$1,198
- 2Gemini 2.5 Flash$295
- 3Mistral Medium 3$528
Claude Sonnet 4.5 costs $1,886 a month, $0.08 per request, 8.9x the cheapest (GPT-5 mini)
Sample list prices per 1M tokens; cached input billed at the cache rate. Cheapest first: GPT-5 mini.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Loading
Loading prices.
What will it cost a month?
150,000 requests · 225.0M input · 60.0M output a month
Claude Sonnet 4.5 costs $1,332 a month, $0.0089 per request, 8.5x the cheapest (GPT-5 mini)
Sample list prices per 1M tokens; cached input billed at the cache rate. Cheapest first: GPT-5 mini.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
LlmCostCalculator
| Prop | Type | Default | Description |
|---|---|---|---|
preset | usize | Default::default() | Starting preset (0 support chat, 1 RAG search, 2 coding agent). |
batch | bool | Default::default() | Show the batch pricing switch (Oxyn extra). |
loading | bool | Default::default() | Show the skeleton. |
error | bool | Default::default() | Show the error state. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| Tab | Presets, the four sliders, the model list |
| ←or→ | One step (Shift: ten) |
| Page upordown · HomeorEnd | Ten steps, or the ends |
| ↑or↓ | On the list, select the next model by rank |
Accessibility
- Sliders have a value text with their unit; the list is a listbox with aria-selected.
- Rows move by transform only, so screen readers keep the reading order of the list.
- The summary (cost a month, per request, how many times the cheapest) is announced when the selection changes.
From the spec
Sliders are native ranges with value text; the ranking is a list with each row's rank and cost in its label; summary in a status line. Every action returns the line the polite live region announces. The focus outline shows only for keyboard focus.
Motion & interaction
Rows re-rank with a FLIP move when the order changes; bars show each model's share of the most expensive. Arrow keys nudge sliders, Shift for big steps.
Timing
Everything on screen is derived from the host clock now (no timers in the component), so playback, tests and the GPUI view agree.
| Transition | Duration | Easing |
|---|---|---|
| Re-rank move | 220 ms | ease-out |
| Bar width | 180 ms | ease-out |
Reduced motion: streamed text and moves appear at their end state; progress still advances, without travel animation.
Responsive behaviour
- Sliders sit beside the ranking; under 600 px they stack and the bars hide, keeping name, rank and cost.
- Costs use tabular numerals in a fixed column, so re-ranking never shifts text.
Edge cases (spec)
Costs use compact notation above $10k. Under 640 px the sliders stack above the ranking. Checked at 1440, 768 and 390 px in light and dark with no text overlap. Chrome is monochrome grey; colour is semantic only (success, warning, danger, info) plus the providers' coloured brand marks.
Notes for AI
- Import
LlmCostCalculatorfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
AiKitViewinoxyn_gpui. - It reads a clock (
now) for live timers; pass one clock for the whole page rather than one per component. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.