Compare AI API costs across providers instantly - A free, open-source web tool to estimate and compare LLM costs from OpenAI, Anthropic, Google, Azure, Mistral, and local models.
- π Instant Calculations - Real-time cost estimates as you adjust parameters
- π’ Multiple Providers - Compare OpenAI, Anthropic, Google, Azure, Mistral, and local models
- π Use Case Templates - Quick-start templates for common scenarios
- πΈ Savings Analysis - See potential savings by switching providers
- π Detailed Breakdown - Input, output, and total costs
- π― No Installation - Runs entirely in your browser
- π± Mobile Friendly - Works on all devices
- π Privacy First - All calculations happen client-side
Provider | Models Included | Notes |
---|---|---|
OpenAI | GPT-4o, GPT-4o Mini, GPT-4 Turbo, GPT-4, GPT-3.5 Turbo | Industry standard |
Anthropic | Claude 3.5 Sonnet, Claude 3 Opus/Sonnet/Haiku | Best for long context |
Gemini 1.5 Pro/Flash, Gemini Pro | 2M token context! | |
Azure OpenAI | GPT-4o, GPT-4 Turbo, GPT-3.5 Turbo | Enterprise features |
Mistral AI | Large, Medium, Small, Tiny | European provider |
Local/Self-Hosted | Llama 3, Mixtral, Custom | $0 API costs |
Visit the live demo: https://turtles-ai-lab.github.io/llm-cost-calculator
# Clone the repository
git clone https://github.com/Turtles-AI-Lab/llm-cost-calculator.git
cd llm-cost-calculator
# Open in browser
open index.html
# or double-click index.html
No dependencies, no build step, no servers - just open and use!
Select from pre-configured scenarios:
- Customer Support Chatbot - 500 input / 200 output tokens
- Document Analysis - 3000 input / 500 output tokens
- Code Generation - 800 input / 600 output tokens
- Ticket Classification - 300 input / 100 output tokens
- Content Generation - 500 input / 1000 output tokens
- Input Tokens: Average tokens sent to the LLM per request (~100 tokens β 75 words)
- Output Tokens: Average tokens generated by the LLM per request
- Requests per Day: How many API calls you'll make daily
- Time Period: Calculate costs for 1 day, 1 week, 1 month, 3 months, or 1 year
Check/uncheck providers to customize your comparison
- Cost Summary: Best value, price range, potential savings, annual cost
- Detailed Table: Full breakdown sorted by cost (cheapest first)
- Per-Request Cost: See exactly what each API call costs you
- Evaluate provider costs before building your product
- Find the most cost-effective model for your use case
- Budget for API costs in your financial projections
- Compare costs when integrating LLMs
- Decide between cloud APIs vs. local hosting
- Optimize token usage to reduce costs
- Estimate annual LLM infrastructure costs
- Compare Azure vs. other providers for enterprise features
- Calculate ROI on local LLM deployment
- Price AI services for clients
- Calculate margin on LLM-powered offerings
- Compare multi-tenant costs
- Input: 500 tokens (customer inquiry)
- Output: 200 tokens (AI response)
- Volume: 1,000 requests/day
- Result: GPT-4o Mini costs $45/month vs. GPT-4 at $18,000/month
- Input: 3,000 tokens (document)
- Output: 500 tokens (summary)
- Volume: 100 requests/day
- Result: Claude 3 Haiku costs $11.25/month vs. Claude 3 Opus at $562.50/month
Edit js/providers.js
:
const LLM_PROVIDERS = {
// Add your provider
myProvider: {
name: "My Provider",
models: {
"my-model": {
name: "My Model",
inputPrice: 1.00, // per 1M tokens
outputPrice: 3.00, // per 1M tokens
contextWindow: 8192
}
}
}
};
Edit js/providers.js
:
const USE_CASE_TEMPLATES = {
myUseCase: {
name: "My Use Case",
avgInputTokens: 500,
avgOutputTokens: 500,
requestsPerDay: 1000
}
};
Contributions welcome! Ways to help:
- π Update pricing data
- β Add new providers or models
- π Report bugs or issues
- π‘ Suggest features
- π Improve documentation
- π Add translations
See CONTRIBUTING.md for guidelines.
Pricing updated September 2025 from official sources:
Note: Pricing may change. Always verify with official provider documentation before making decisions.
MIT License - see LICENSE file
Free to use, modify, and distribute. Attribution appreciated!
Built by Turtles AI Lab - We build AI-powered business solutions.
- TicketZero AI - Atera Edition - AI ticket resolution for Atera
- TicketZero AI - Zoho Edition - AI ticket resolution for Zoho Desk
- AI Ticket Classifier - Open-source ticket classification library
Need help with AI integration?
- Custom LLM solution development
- Cost optimization consulting
- Integration support
π§ Contact: jgreenia@jandraisolutions.com
If you find this tool useful:
- β Star this repository
- π Report bugs or request features
- π¬ Share with your network
- π Improve documentation
Made with β€οΈ by Turtles AI Lab
Helping businesses make informed decisions about AI costs.