Skip to content

xyzm6/llm-cost-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

llm-cost-calculator

A Claude Code Skill that gives Claude precise LLM API pricing data to estimate costs and compare providers instantly — without leaving your editor.

GitHub stars

Why this exists

Claude can answer "how much does GPT-5.4 cost?" from memory, but the answer is often wrong or outdated. LLM prices change every few weeks. This skill provides structured, verified pricing data so Claude can give you exact numbers and do real math.

What it does

Ask Claude Code questions like:

  • "How much would it cost to run 10K RAG queries/day on Claude Sonnet?"
  • "Compare GPT-5.4 vs Gemini 2.5 Pro vs DeepSeek V4 for my chatbot"
  • "What's the cheapest model for batch classification of 1M items?"
  • "Estimate my monthly bill if I process 500 documents/day"
  • "Is prompt caching worth it for my use case?"

Claude reads the pricing files, applies the right formula, and shows you the math — not just a number.

Why not just use a web calculator?

Web calculators (LiteLLM, OpenRouter, PricePerToken) require tab-switching and manual input. This skill:

  • Gives instant answers inside your editor while you're coding
  • Understands your workload from natural language ("a customer support chatbot handling 1K chats/day")
  • Compares across providers in one query instead of opening 3 tabs
  • Suggests optimizations (caching, batching, model downsizing) automatically

Install

git clone https://github.com/xyzm6/llm-cost-calculator ~/.claude/skills/llm-cost-calculator

Coverage

6 providers, 30+ models with input/output/cached/batch pricing:

  • OpenAI: GPT-5.4, GPT-4.1, o3, o4-mini, embeddings, audio, images
  • Anthropic: Claude Opus 4.6, Sonnet 4.6, Haiku 4.5
  • Google: Gemini 3 Pro, 2.5 Pro, 2.5 Flash, Flash-Lite (+ free tier)
  • DeepSeek: V4, V3, R1
  • Mistral: Large, Medium 3, Small, Nemo, Codestral
  • Cohere: Command R+, Command R, Command A

Structure

llm-cost-calculator/
├── SKILL.md
├── README.md
└── references/
    ├── pricing-openai.md         # OpenAI pricing
    ├── pricing-anthropic.md      # Claude pricing
    ├── pricing-google.md         # Gemini pricing + free tier
    ├── pricing-others.md         # DeepSeek, Mistral, Cohere, xAI
    ├── comparison-matrix.md      # Cross-provider comparison + use case recommendations
    └── calculation-templates.md  # Formulas + workload templates

Maintained by

Maintained by the xyzm6 team. We track LLM pricing across providers as part of building AI-powered products. Browse our other Claude Code skills.

License

MIT

Contributing

LLM pricing changes fast. PRs welcome for:

  • Price updates (include the official source link)
  • New provider/model additions
  • New workload templates
  • Corrections to calculation logic

When updating prices, change the Last verified date at the top of the file.

Related

About

Claude Code Skill — estimate and compare LLM API costs across OpenAI, Anthropic, Google, DeepSeek, Mistral. Per-token pricing, batch/caching discounts, workload templates, cross-provider comparison.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors