.calc-page { max-width: 1000px; margin: 0 auto; font-family: -apple-system, BlinkMacSystemFont, ‚Segoe UI‘, Roboto, sans-serif; color: #333; }
.calc-page h1 { color: #1a1a2e; }
.input-section { background: #f8f9ff; padding: 20px; border-radius: 12px; margin-bottom: 24px; border: 1px solid #e0e4f0; }
.input-section label { display: block; font-weight: 600; margin-bottom: 6px; color: #16213e; }
.input-section input, .input-section select { padding: 10px 14px; font-size: 16px; border: 2px solid #d0d4e0; border-radius: 8px; width: 100%; max-width: 400px; box-sizing: border-box; }
.input-section input:focus { border-color: #16213e; outline: none; }
.results-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.results-table th { background: #16213e; color: white; padding: 12px 16px; text-align: left; }
.results-table td { padding: 10px 16px; border-bottom: 1px solid #e8ecf5; }
.results-table tr:hover { background: #f0f4ff; }
.results-table .cheapest { background: #e6ffe6 !important; font-weight: 700; }
.results-table .most-expensive { background: #fff0f0 !important; }
.cost-bar { height: 20px; background: #3a7bd5; border-radius: 4px; min-width: 4px; transition: width 0.3s; }
.cost-bar-container { display: flex; align-items: center; gap: 8px; }
.model-name { font-weight: 600; min-width: 200px; }
.price-per-1k { color: #666; font-size: 0.9em; }
.summary-box { background: #e6ffe6; border: 2px solid #4caf50; border-radius: 8px; padding: 16px; margin-top: 20px; }

LLM API Cost Calculator — Compare 25+ Models

Reviewed: June 4, 2026

Real-time cost comparison across major LLM providers. Prices as of May 2026.

Model Provider Input ($/1M) Output ($/1M) Cost/Request Monthly Cost Relative Cost

var models = [
{ name: „GPT-4o“, provider: „OpenAI“, inputPrice: 2.50, outputPrice: 10.00 },
{ name: „GPT-4o-mini“, provider: „OpenAI“, inputPrice: 0.15, outputPrice: 0.60 },
{ name: „GPT-4.1“, provider: „OpenAI“, inputPrice: 2.00, outputPrice: 8.00 },
{ name: „GPT-4.1-mini“, provider: „OpenAI“, inputPrice: 0.40, outputPrice: 1.60 },
{ name: „GPT-4.1-nano“, provider: „OpenAI“, inputPrice: 0.10, outputPrice: 0.40 },
{ name: „o4-mini“, provider: „OpenAI“, inputPrice: 1.10, outputPrice: 4.40 },
{ name: „Claude 3.5 Sonnet“, provider: „Anthropic“, inputPrice: 3.00, outputPrice: 15.00 },
{ name: „Claude 3.5 Haiku“, provider: „Anthropic“, inputPrice: 0.25, outputPrice: 1.25 },
{ name: „Claude 3 Opus“, provider: „Anthropic“, inputPrice: 15.00, outputPrice: 75.00 },
{ name: „Gemini 2.5 Pro“, provider: „Google“, inputPrice: 1.25, outputPrice: 10.00 },
{ name: „Gemini 2.5 Flash“, provider: „Google“, inputPrice: 0.15, outputPrice: 0.60 },
{ name: „Gemini 2.0 Flash“, provider: „Google“, inputPrice: 0.10, outputPrice: 0.40 },
{ name: „Llama 3.1 405B“, provider: „Meta“, inputPrice: 0.90, outputPrice: 0.90 },
{ name: „Llama 3.1 70B“, provider: „Meta“, inputPrice: 0.25, outputPrice: 0.25 },
{ name: „Llama 3.1 8B“, provider: „Meta“, inputPrice: 0.05, outputPrice: 0.05 },
{ name: „Mistral Large 2“, provider: „Mistral“, inputPrice: 2.00, outputPrice: 6.00 },
{ name: „Mistral Small“, provider: „Mistral“, inputPrice: 0.20, outputPrice: 0.60 },
{ name: „Mixtral 8x7B“, provider: „Mistral“, inputPrice: 0.60, outputPrice: 0.60 },
{ name: „Command R+“, provider: „Cohere“, inputPrice: 2.50, outputPrice: 10.00 },
{ name: „Command R“, provider: „Cohere“, inputPrice: 0.50, outputPrice: 1.50 },
{ name: „DeepSeek V3“, provider: „DeepSeek“, inputPrice: 0.27, outputPrice: 1.10 },
{ name: „DeepSeek R1“, provider: „DeepSeek“, inputPrice: 0.55, outputPrice: 2.19 },
{ name: „Grok-2“, provider: „xAI“, inputPrice: 2.00, outputPrice: 10.00 },
{ name: „Grok-2-mini“, provider: „xAI“, inputPrice: 0.20, outputPrice: 0.60 },
{ name: „Qwen-2.5-72B“, provider: „Alibaba“, inputPrice: 0.40, outputPrice: 0.80 }
];

function calculate() {
var inTokens = Math.max(1, parseInt(document.getElementById(‚inputTokens‘).value) || 1000);
var outTokens = Math.max(1, parseInt(document.getElementById(‚outputTokens‘).value) || 500);
var reqPerDay = Math.max(1, parseInt(document.getElementById(‚requestsPerDay‘).value) || 1000);
var days = Math.max(1, parseInt(document.getElementById(‚daysPerMonth‘).value) || 30);

var results = models.map(function(m) {
var costPerRequest = (inTokens / 1000000 * m.inputPrice) + (outTokens / 1000000 * m.outputPrice);
var monthlyCost = costPerRequest * reqPerDay * days;
return {
name: m.name,
provider: m.provider,
inputPrice: m.inputPrice,
outputPrice: m.outputPrice,
costPerRequest: costPerRequest,
monthlyCost: monthlyCost
};
});

results.sort(function(a, b) { return a.monthlyCost – b.monthlyCost; });

var minCost = results[0].monthlyCost;
var maxCost = results[results.length – 1].monthlyCost;
var range = maxCost – minCost || 1;

var tbody = document.getElementById(‚resultsBody‘);
tbody.innerHTML = “;

results.forEach(function(r, idx) {
var pct = ((r.monthlyCost – minCost) / range) * 100;
var rowClass = idx === 0 ? ‚cheapest‘ : (idx === results.length – 1 ? ‚most-expensive‘ : “);
var barWidth = Math.max(2, pct);
var row = ‚

‚ +

‚ + r.name + ‚

‚ +

‚ + r.provider + ‚

‚ +

$‘ + r.inputPrice.toFixed(2) + ‚

‚ +

$‘ + r.outputPrice.toFixed(2) + ‚

‚ +

$‘ + r.costPerRequest.toFixed(6) + ‚

‚ +

$‘ + r.monthlyCost.toFixed(2) + ‚

‚ +

‚ + (r.monthlyCost / reqPerDay / days * 1000).toFixed(4) + ‚/1K req

‚ +

‚;
tbody.innerHTML += row;
});

var cheapest = results[0];
var mostExpensive = results[results.length – 1];
var savings = mostExpensive.monthlyCost – cheapest.monthlyCost;
var savingsPct = savings / mostExpensive.monthlyCost * 100;

document.getElementById(’summaryBox‘).innerHTML =
Summary: Cheapest is ‚ + cheapest.name + ‚ ($‘ + cheapest.monthlyCost.toFixed(2) + ‚/mo). ‚ +
‚Most expensive is ‚ + mostExpensive.name + ‚ ($‘ + mostExpensive.monthlyCost.toFixed(2) + ‚/mo). ‚ +
‚Potential savings: $‘ + savings.toFixed(2) + ‚/mo (‚ + savingsPct.toFixed(0) + ‚%) by choosing the cheapest option.‘;
}

calculate();

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert