Skip to content
Back

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-calculator

What will it cost a month?

150,000 requests · 225.0M input · 60.0M output a month

1,500
400
5,000
40%
  1. 8Claude Opus 4.1$6,660
  2. 7Claude Sonnet 4.5$1,332
  3. 4Claude Haiku 4.5$444
  4. 5GPT-5$780
  5. 1GPT-5 miniCheapest$156
  6. 6Gemini 2.5 Pro$797
  7. 2Gemini 2.5 Flash$197
  8. 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 code is part of Oxyn Pro

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.

Get Pro

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

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.

Terminal
oxyn add llm-cost-calculator

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Support chat

A support chat workload.

What will it cost a month?

150,000 requests · 225.0M input · 60.0M output a month

1,500
400
5,000
40%
  1. 8Claude Opus 4.1$6,660
  2. 7Claude Sonnet 4.5$1,332
  3. 4Claude Haiku 4.5$444
  4. 5GPT-5$780
  5. 1GPT-5 miniCheapest$156
  6. 6Gemini 2.5 Pro$797
  7. 2Gemini 2.5 Flash$197
  8. 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 code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

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

40,000
3,000
800
80%
  1. 8Claude Opus 4.1$9,432
  2. 7Claude Sonnet 4.5$1,886
  3. 4Claude Haiku 4.5$629
  4. 5GPT-5$1,056
  5. 1GPT-5 miniCheapest$211
  6. 6Gemini 2.5 Pro$1,198
  7. 2Gemini 2.5 Flash$295
  8. 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 code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Loading

Loading prices.

What will it cost a month?

150,000 requests · 225.0M input · 60.0M output a month

1,500
400
5,000
40%

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 code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

LlmCostCalculator

PropTypeDefaultDescription
presetusizeDefault::default()Starting preset (0 support chat, 1 RAG search, 2 coding agent).
batchboolDefault::default()Show the batch pricing switch (Oxyn extra).
loadingboolDefault::default()Show the skeleton.
errorboolDefault::default()Show the error state.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
TabPresets, the four sliders, the model list
←or→One step (Shift: ten)
Page upordown · HomeorEndTen 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.

TransitionDurationEasing
Re-rank move220 msease-out
Bar width180 msease-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 LlmCostCalculator from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: AiKitView in oxyn_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.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI