Developer utility · Local-first history

OpenAI pricing calculator

Dial in prompt and completion tokens, then compare GPT-family models side by side. Numbers follow your config file so you can mirror published rates.

Pricing data loads from config/models.php and /api/pricing. Verify against provider pages before billing decisions.

Calculator

Cost = (prompt ÷ 1000 × Pin) + (completion ÷ 1000 × Pout), then × requests.

Usage presets

Multi-model comparison

Toggle models to compare the same workload. The cheapest option is highlighted.

Monthly cost simulator

Project from average daily requests (uses tokens above).

Uses primary model rates for projections.

Token estimator

Rough heuristic: ~4 characters ≈ 1 token for Latin text (indicative only).

Estimated tokens: 0 · Cost @ primary:

API budget planner

Set a monthly cap to see how many identical requests fit (primary model).

Max requests (approx):

Prompt optimization analyzer

Collapse whitespace and tighten wording to preview savings at the primary model.

Suggested shorter form:


                    

Token delta: 0 · Est. savings / 1k calls:

Fine-tuning cost sketch

Order-of-magnitude helper: training tokens × epochs × rate + storage.

Est. training + 1 mo storage:

Team usage calculator

Multiply per-person daily volume by team size (primary model).

Team monthly (22d):

Cost per feature

Price a single product surface (e.g., one chat turn or one generated article).

Uses prompt & completion tokens from the calculator for one invocation.

Cost per use: · Monthly @ that cadence:

Share & export

Serialize inputs in the URL hash or copy a text summary.

Calculation history

Stored in your browser only (LocalStorage).

    Guide

    Tokens, pricing & how to use this calculator

    Plain-language reference for engineers planning LLM spend. Skim the cards below or jump to a specialized page at the end.

    What are tokens?

    Tokens are the chunks of text models read and write—often a few characters or part of a word. You are billed separately for input (your prompt) and output (the model’s reply). Big JSON payloads, long system prompts, and high max_tokens all push cost up.

    How API pricing works

    Providers usually quote dollars per million or thousand tokens for input and output. Output is often pricier than input. This app applies the standard formula: scale your token counts to match the per-1K rate in config, sum input + output for one call, then multiply by your number of requests.

    Tips to reduce API cost

    • Cap completion length and tighten system prompts so the model stays concise.
    • Cache stable context server-side instead of resending huge prompts every turn.
    • Route simple tasks to smaller models; reserve large models for hard paths.
    • Use the comparison table here to see which configured model is cheapest for the same tokens.

    Model comparison & keeping rates fresh

    Line up OpenAI, Anthropic, and DeepSeek rows from config/models.php. After deploy, the UI reads that config; scripts can also pull /api/pricing. Replace numbers whenever vendors publish new tables—this tool does not replace official billing consoles.