{"id":10283,"date":"2026-08-15T01:16:52","date_gmt":"2026-08-14T23:16:52","guid":{"rendered":"https:\/\/www.lukaswojcik.com\/blog\/toolbox\/llm-api-token-cost-calculator\/"},"modified":"2026-08-15T01:16:52","modified_gmt":"2026-08-14T23:16:52","slug":"llm-api-token-cost-calculator","status":"publish","type":"page","link":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/llm-api-token-cost-calculator\/","title":{"rendered":"LLM API Token &#038; Cost Calculator"},"content":{"rendered":"<div class=\"gtm-analyser-container\" style=\"background: var(--bg-panel, #1e1e24); padding: 25px; border-radius: 8px; border: 1px solid var(--border, #2a2a35);\">\n<p style=\"color: var(--text-secondary, #a0a0b0); margin-bottom: 20px;\">Bills for language models are surprising in one direction only. The prices below are entered by hand so that the calculation stays correct when they change &#8211; what matters is the split between input, cached input and output.<\/p>\n<div style=\"display: flex; gap: 12px; flex-wrap: wrap;\">\n<div style=\"flex: 1; min-width: 160px;\">\n            <label for=\"lk-eingabe\" style=\"color: var(--text-secondary, #a0a0b0); display: block; font-size: 0.85rem; margin-bottom: 5px;\">Input tokens per request<\/label><br \/>\n            <input type=\"text\" id=\"lk-eingabe\" class=\"form-control\" style=\"width: 100%; padding: 10px; background: var(--bg-body, #14141a); border: 1px solid var(--border, #2a2a35); color: var(--text-primary, #e8e8ee); border-radius: 6px; font-family: monospace; box-sizing: border-box;\" value=\"12000\">\n        <\/div>\n<div style=\"flex: 1; min-width: 160px;\">\n            <label for=\"lk-ausgabe\" style=\"color: var(--text-secondary, #a0a0b0); display: block; font-size: 0.85rem; margin-bottom: 5px;\">Output tokens per request<\/label><br \/>\n            <input type=\"text\" id=\"lk-ausgabe\" class=\"form-control\" style=\"width: 100%; padding: 10px; background: var(--bg-body, #14141a); border: 1px solid var(--border, #2a2a35); color: var(--text-primary, #e8e8ee); border-radius: 6px; font-family: monospace; box-sizing: border-box;\" value=\"800\">\n        <\/div>\n<div style=\"flex: 1; min-width: 160px;\">\n            <label for=\"lk-anfragen\" style=\"color: var(--text-secondary, #a0a0b0); display: block; font-size: 0.85rem; margin-bottom: 5px;\">Requests per month<\/label><br \/>\n            <input type=\"text\" id=\"lk-anfragen\" class=\"form-control\" style=\"width: 100%; padding: 10px; background: var(--bg-body, #14141a); border: 1px solid var(--border, #2a2a35); color: var(--text-primary, #e8e8ee); border-radius: 6px; font-family: monospace; box-sizing: border-box;\" value=\"30000\">\n        <\/div>\n<div style=\"flex: 1; min-width: 160px;\">\n            <label for=\"lk-cache\" style=\"color: var(--text-secondary, #a0a0b0); display: block; font-size: 0.85rem; margin-bottom: 5px;\">Share of the input read from cache (%)<\/label><br \/>\n            <input type=\"text\" id=\"lk-cache\" class=\"form-control\" style=\"width: 100%; padding: 10px; background: var(--bg-body, #14141a); border: 1px solid var(--border, #2a2a35); color: var(--text-primary, #e8e8ee); border-radius: 6px; font-family: monospace; box-sizing: border-box;\" value=\"0\">\n        <\/div>\n<\/p><\/div>\n<div style=\"color: var(--text-secondary, #a0a0b0); font-size: 0.85rem; margin: 18px 0 8px;\">Prices per million tokens, in the currency of the invoice<\/div>\n<div style=\"display: flex; gap: 12px; flex-wrap: wrap;\">\n<div style=\"flex: 1; min-width: 150px;\">\n            <label for=\"lk-preis-ein\" style=\"color: var(--text-secondary, #a0a0b0); display: block; font-size: 0.8rem; margin-bottom: 4px;\">Input<\/label><br \/>\n            <input type=\"text\" id=\"lk-preis-ein\" class=\"form-control\" style=\"width: 100%; padding: 9px; background: var(--bg-body, #14141a); border: 1px solid var(--border, #2a2a35); color: var(--text-primary, #e8e8ee); border-radius: 6px; font-family: monospace; box-sizing: border-box;\" value=\"3.00\">\n        <\/div>\n<div style=\"flex: 1; min-width: 150px;\">\n            <label for=\"lk-preis-aus\" style=\"color: var(--text-secondary, #a0a0b0); display: block; font-size: 0.8rem; margin-bottom: 4px;\">Output<\/label><br \/>\n            <input type=\"text\" id=\"lk-preis-aus\" class=\"form-control\" style=\"width: 100%; padding: 9px; background: var(--bg-body, #14141a); border: 1px solid var(--border, #2a2a35); color: var(--text-primary, #e8e8ee); border-radius: 6px; font-family: monospace; box-sizing: border-box;\" value=\"15.00\">\n        <\/div>\n<div style=\"flex: 1; min-width: 150px;\">\n            <label for=\"lk-preis-cache\" style=\"color: var(--text-secondary, #a0a0b0); display: block; font-size: 0.8rem; margin-bottom: 4px;\">Cached input<\/label><br \/>\n            <input type=\"text\" id=\"lk-preis-cache\" class=\"form-control\" style=\"width: 100%; padding: 9px; background: var(--bg-body, #14141a); border: 1px solid var(--border, #2a2a35); color: var(--text-primary, #e8e8ee); border-radius: 6px; font-family: monospace; box-sizing: border-box;\" value=\"0.30\">\n        <\/div>\n<div style=\"flex: 1; min-width: 150px;\">\n            <label for=\"lk-rabatt\" style=\"color: var(--text-secondary, #a0a0b0); display: block; font-size: 0.8rem; margin-bottom: 4px;\">Discount<\/label><br \/>\n            <select id=\"lk-rabatt\" class=\"form-control\" style=\"width: 100%; padding: 9px; background: var(--bg-body, #14141a); border: 1px solid var(--border, #2a2a35); color: var(--text-primary, #e8e8ee); border-radius: 6px; font-family: monospace; box-sizing: border-box;\"><option value=\"0\">none<\/option><option value=\"50\">batch, 50 percent<\/option><\/select>\n        <\/div>\n<\/p><\/div>\n<p>    <label for=\"lk-text\" style=\"color: var(--text-secondary, #a0a0b0); display: block; font-size: 0.85rem; margin: 15px 0 5px;\">Estimate tokens from a text (optional)<\/label><br \/>\n    <textarea id=\"lk-text\" class=\"form-control\" style=\"width: 100%; height: 70px; padding: 10px; background: var(--bg-body, #14141a); border: 1px solid var(--border, #2a2a35); color: var(--text-primary, #e8e8ee); border-radius: 6px; font-family: monospace; font-size: 0.82rem; box-sizing: border-box;\" placeholder=\"Paste a prompt here to see roughly how many tokens it carries\"><\/textarea><\/p>\n<div style=\"display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 0;\">\n        <button id=\"lk-btn\" class=\"button\" style=\"background: var(--accent, #7ee787); color: #0b1114; border: none; padding: 12px 24px; border-radius: 6px; font-weight: 700; cursor: pointer;\">Work it out<\/button>\n    <\/div>\n<div id=\"lk-ergebnis\" style=\"margin-top: 22px;\"><\/div>\n<\/div>\n<p><script>\n(function () {\n    'use strict';<\/p>\n<p>    const T = {\"einleitung\":\"Bills for language models are surprising in one direction only. The prices below are entered by hand so that the calculation stays correct when they change - what matters is the split between input, cached input and output.\",\"label_eingabe\":\"Input tokens per request\",\"label_ausgabe\":\"Output tokens per request\",\"label_anfragen\":\"Requests per month\",\"label_cache\":\"Share of the input read from cache (%)\",\"label_preise\":\"Prices per million tokens, in the currency of the invoice\",\"preis_ein\":\"Input\",\"preis_aus\":\"Output\",\"preis_cache\":\"Cached input\",\"label_rabatt\":\"Discount\",\"rabatt_keiner\":\"none\",\"rabatt_stapel\":\"batch, 50 percent\",\"label_text\":\"Estimate tokens from a text (optional)\",\"ph_text\":\"Paste a prompt here to see roughly how many tokens it carries\",\"knopf\":\"Work it out\",\"fehler_tokens\":\"The token counts have to be numbers.\",\"fehler_anfragen\":\"The number of requests has to be above zero.\",\"fehler_cache\":\"The cached share has to lie between 0 and 100.\",\"fehler_preise\":\"The prices have to be numbers.\",\"h_kosten\":\"Cost\",\"h_aufteilung\":\"Where it goes\",\"h_schaetzung\":\"Tokens in that text\",\"h_befunde\":\"Findings\",\"z_pro_anfrage\":\"Per request\",\"z_monat\":\"Per month\",\"z_jahr\":\"Per year\",\"z_zehnfach\":\"At ten times the volume\",\"z_anteil_ein\":\"Input\",\"z_anteil_cache\":\"Cached input\",\"z_anteil_aus\":\"Output\",\"z_tokens_ein\":\"Input tokens per month\",\"z_tokens_aus\":\"Output tokens per month\",\"z_zeichen\":\"Characters\",\"z_woerter\":\"Words\",\"z_tokens_en\":\"Tokens, English text\",\"z_tokens_de\":\"Tokens, German or Polish text\",\"schaetzung_erklaerung\":\"A rough estimate: about four characters per token in English, about three in German and Polish, where long compounds and accented characters split into more pieces. Only the tokeniser of the model gives the exact number.\",\"b_ausgabe\":\"%s percent of the cost sits in the output. Shorter answers save more here than a shorter prompt.\",\"b_eingabe\":\"%s percent of the cost sits in the input. That is the part a cache or a shorter context can bring down.\",\"b_ohne_cache\":\"A prompt of this size without caching pays for the same system prompt on every single request. Where the first part stays identical, caching is the largest single saving.\",\"b_mit_cache\":\"The cache saves %s per month against the same volume at the full input price.\",\"b_stapel\":\"The batch discount comes with a delay: whatever has to answer inside a request cannot use it.\",\"b_grosses_fenster\":\"Above a hundred thousand input tokens per request the context is doing the work of a retrieval step. It is usually cheaper to search first and only pass what is needed.\",\"b_preise\":\"The prices are the ones entered here. They change, and the calculation is only as current as those four fields.\",\"b_wiederholung\":\"A failed request that is retried counts twice. At a percent of retries that is a percent on the bill.\"};<\/p>\n<p>    \/\/ --- reine Rechenlogik ---<\/p>\n<p>    function zahl(wert) {\n        const roh = String(wert === undefined || wert === null ? '' : wert).trim().replace(\/\\s\/g, '').replace(',', '.');\n        if (roh === '') { return NaN; }\n        if (!\/^[0-9]+(\\.[0-9]+)?$\/.test(roh)) { return NaN; }\n        return parseFloat(roh);\n    }<\/p>\n<p>    function runde(wert, stellen) {\n        const faktor = Math.pow(10, stellen === undefined ? 2 : stellen);\n        return Math.round(wert * faktor) \/ faktor;\n    }<\/p>\n<p>    \/**\n     * Grobe Schaetzung: im Englischen kommen rund vier Zeichen auf ein Token,\n     * im Deutschen und Polnischen wegen der langen Woerter und der\n     * Sonderzeichen eher drei.\n     *\/\n    function tokenSchaetzen(text) {\n        const roh = String(text === undefined || text === null ? '' : text);\n        const zeichen = roh.length;\n        if (zeichen === 0) { return { zeichen: 0, woerter: 0, englisch: 0, deutsch: 0 }; }\n        const woerter = roh.trim() === '' ? 0 : roh.trim().split(\/\\s+\/).length;\n        return {\n            zeichen: zeichen,\n            woerter: woerter,\n            englisch: Math.ceil(zeichen \/ 4),\n            deutsch: Math.ceil(zeichen \/ 3)\n        };\n    }<\/p>\n<p>    function rechnen(e) {\n        const ergebnis = { ok: false, fehler: '', befunde: [] };\n        const eingabe = e || {};<\/p>\n<p>        const ein = zahl(eingabe.eingabe);\n        const aus = zahl(eingabe.ausgabe);\n        const anfragen = zahl(eingabe.anfragen);\n        const cacheAnteil = zahl(eingabe.cache);\n        const preisEin = zahl(eingabe.preisEin);\n        const preisAus = zahl(eingabe.preisAus);\n        const preisCache = zahl(eingabe.preisCache);\n        const rabatt = zahl(eingabe.rabatt);<\/p>\n<p>        if (!isFinite(ein) || !isFinite(aus)) { ergebnis.fehler = T.fehler_tokens; return ergebnis; }\n        if (!isFinite(anfragen) || anfragen <= 0) { ergebnis.fehler = T.fehler_anfragen; return ergebnis; }\n        if (!isFinite(cacheAnteil) || cacheAnteil < 0 || cacheAnteil > 100) { ergebnis.fehler = T.fehler_cache; return ergebnis; }\n        if (!isFinite(preisEin) || !isFinite(preisAus) || !isFinite(preisCache)) { ergebnis.fehler = T.fehler_preise; return ergebnis; }<\/p>\n<p>        const faktor = 1 - (isFinite(rabatt) ? rabatt : 0) \/ 100;\n        const einCache = ein * (cacheAnteil \/ 100);\n        const einVoll = ein - einCache;<\/p>\n<p>        const proAnfrage = (einVoll \/ 1000000 * preisEin + einCache \/ 1000000 * preisCache + aus \/ 1000000 * preisAus) * faktor;\n        const monat = proAnfrage * anfragen;<\/p>\n<p>        ergebnis.ok = true;\n        ergebnis.tokensEin = ein * anfragen;\n        ergebnis.tokensAus = aus * anfragen;\n        ergebnis.proAnfrage = runde(proAnfrage, 6);\n        ergebnis.monat = runde(monat, 2);\n        ergebnis.jahr = runde(monat * 12, 2);\n        ergebnis.anteilEin = runde(einVoll \/ 1000000 * preisEin * faktor * anfragen, 2);\n        ergebnis.anteilCache = runde(einCache \/ 1000000 * preisCache * faktor * anfragen, 2);\n        ergebnis.anteilAus = runde(aus \/ 1000000 * preisAus * faktor * anfragen, 2);\n        ergebnis.ohneCache = runde((ein \/ 1000000 * preisEin + aus \/ 1000000 * preisAus) * faktor * anfragen, 2);\n        ergebnis.ersparnisCache = runde(ergebnis.ohneCache - ergebnis.monat, 2);\n        ergebnis.zehnfach = runde(monat * 10, 2);\n        ergebnis.text = tokenSchaetzen(eingabe.text);<\/p>\n<p>        \/\/ --- Befunde ---\n        const anteilAusgabe = ergebnis.monat > 0 ? ergebnis.anteilAus \/ ergebnis.monat * 100 : 0;\n        if (anteilAusgabe > 50) {\n            ergebnis.befunde.push({ schwer: false, text: T.b_ausgabe.replace('%s', String(runde(anteilAusgabe, 0))) });\n        } else if (ein > 0) {\n            ergebnis.befunde.push({ schwer: false, text: T.b_eingabe.replace('%s', String(runde(100 - anteilAusgabe, 0))) });\n        }\n        if (cacheAnteil === 0 && ein >= 2000) {\n            ergebnis.befunde.push({ schwer: true, text: T.b_ohne_cache });\n        }\n        if (cacheAnteil > 0) {\n            ergebnis.befunde.push({ schwer: false, text: T.b_mit_cache.replace('%s', String(ergebnis.ersparnisCache)) });\n        }\n        if (rabatt > 0) {\n            ergebnis.befunde.push({ schwer: false, text: T.b_stapel });\n        }\n        if (ein > 100000) {\n            ergebnis.befunde.push({ schwer: true, text: T.b_grosses_fenster });\n        }\n        ergebnis.befunde.push({ schwer: false, text: T.b_preise });\n        ergebnis.befunde.push({ schwer: false, text: T.b_wiederholung });<\/p>\n<p>        return ergebnis;\n    }<\/p>\n<p>    if (typeof window !== 'undefined') {\n        window.LW_TEST = window.LW_TEST || {};\n        window.LW_TEST.LK = { rechnen: rechnen, tokenSchaetzen: tokenSchaetzen, zahl: zahl };\n    }<\/p>\n<p>    \/\/ --- Anbindung an das Dokument ---<\/p>\n<p>    const btn = document.getElementById('lk-btn');\n    const out = document.getElementById('lk-ergebnis');\n    if (!btn || !out) { return; }<\/p>\n<p>    const KASTEN = 'background: var(--bg-body, #14141a); border: 1px solid var(--border, #2a2a35); border-radius: 6px; padding: 14px; margin-bottom: 18px;';\n    const UEBERSCHRIFT = 'color: var(--text-primary, #e8e8ee); font-weight: 700; margin-bottom: 8px;';<\/p>\n<p>    function el(tag, css, inhalt) {\n        const knoten = document.createElement(tag);\n        if (css) { knoten.setAttribute('style', css); }\n        if (inhalt !== undefined && inhalt !== null) { knoten.textContent = inhalt; }\n        return knoten;\n    }<\/p>\n<p>    function wert(id) {\n        const knoten = document.getElementById(id);\n        return knoten ? knoten.value : '';\n    }<\/p>\n<p>    function zeile(kasten, name, inhalt, hervor) {\n        const z = el('div', 'display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 5px 0;');\n        z.appendChild(el('span', 'color: var(--text-secondary, #a0a0b0);', name));\n        z.appendChild(el('span', 'color: ' + (hervor ? 'var(--accent, #7ee787)' : 'var(--text-primary, #e8e8ee)') + '; font-family: monospace;', inhalt));\n        kasten.appendChild(z);\n    }<\/p>\n<p>    btn.addEventListener('click', function () {\n        const erg = rechnen({\n            eingabe: wert('lk-eingabe'), ausgabe: wert('lk-ausgabe'), anfragen: wert('lk-anfragen'),\n            cache: wert('lk-cache'), preisEin: wert('lk-preis-ein'), preisAus: wert('lk-preis-aus'),\n            preisCache: wert('lk-preis-cache'), rabatt: wert('lk-rabatt'), text: wert('lk-text')\n        });<\/p>\n<p>        out.textContent = '';\n        if (!erg.ok) {\n            out.appendChild(el('div', 'background: var(--bg-body, #14141a); border: 1px solid var(--border, #2a2a35); border-left: 3px solid #ffb86c; color: var(--text-secondary, #a0a0b0); padding: 14px; border-radius: 6px;', erg.fehler));\n            return;\n        }<\/p>\n<p>        out.appendChild(el('div', UEBERSCHRIFT, T.h_kosten));\n        const kasten = el('div', KASTEN);\n        zeile(kasten, T.z_pro_anfrage, erg.proAnfrage.toFixed(6));\n        zeile(kasten, T.z_monat, erg.monat.toFixed(2), true);\n        zeile(kasten, T.z_jahr, erg.jahr.toFixed(2));\n        zeile(kasten, T.z_zehnfach, erg.zehnfach.toFixed(2));\n        out.appendChild(kasten);<\/p>\n<p>        out.appendChild(el('div', UEBERSCHRIFT, T.h_aufteilung));\n        const teile = el('div', KASTEN);\n        zeile(teile, T.z_anteil_ein, erg.anteilEin.toFixed(2));\n        if (erg.anteilCache > 0) { zeile(teile, T.z_anteil_cache, erg.anteilCache.toFixed(2)); }\n        zeile(teile, T.z_anteil_aus, erg.anteilAus.toFixed(2));\n        zeile(teile, T.z_tokens_ein, String(erg.tokensEin));\n        zeile(teile, T.z_tokens_aus, String(erg.tokensAus));\n        out.appendChild(teile);<\/p>\n<p>        if (erg.text.zeichen > 0) {\n            out.appendChild(el('div', UEBERSCHRIFT, T.h_schaetzung));\n            const schaetzung = el('div', KASTEN);\n            zeile(schaetzung, T.z_zeichen, String(erg.text.zeichen));\n            zeile(schaetzung, T.z_woerter, String(erg.text.woerter));\n            zeile(schaetzung, T.z_tokens_en, String(erg.text.englisch));\n            zeile(schaetzung, T.z_tokens_de, String(erg.text.deutsch));\n            schaetzung.appendChild(el('div', 'color: var(--text-secondary, #a0a0b0); font-size: 0.85rem; padding-top: 8px;', T.schaetzung_erklaerung));\n            out.appendChild(schaetzung);\n        }<\/p>\n<p>        out.appendChild(el('div', UEBERSCHRIFT, T.h_befunde));\n        const befunde = el('div', KASTEN);\n        erg.befunde.forEach(function (b) {\n            const z = el('div', 'display: flex; gap: 10px; padding: 5px 0;');\n            z.appendChild(el('span', 'color: ' + (b.schwer ? '#ffb86c' : 'var(--text-secondary, #a0a0b0)') + '; font-family: monospace;', b.schwer ? '!' : '-'));\n            z.appendChild(el('span', 'color: var(--text-secondary, #a0a0b0); font-size: 0.9rem; line-height: 1.5;', b.text));\n            befunde.appendChild(z);\n        });\n        out.appendChild(befunde);\n    });\n})();\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Works out what a language model costs per request, per month and at ten times the volume, splits input, cached input and output, and estimates tokens from a piece of text.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":38,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"template-tool-base.php","meta":{"footnotes":""},"tags":[91106,91407,91404],"class_list":["post-10283","page","type-page","status-publish","hentry","tag-automation","tag-google-cloud","tag-llm"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>LLM API Token &amp; Cost Calculator - Lukas Wojcik - Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/llm-api-token-cost-calculator\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"LLM API Token &amp; Cost Calculator - Lukas Wojcik - Blog\" \/>\n<meta property=\"og:description\" content=\"Works out what a language model costs per request, per month and at ten times the volume, splits input, cached input and output, and estimates tokens from a piece of text.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/llm-api-token-cost-calculator\/\" \/>\n<meta property=\"og:site_name\" content=\"Lukas Wojcik - Blog\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/08\/og-default.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/toolbox\\\/llm-api-token-cost-calculator\\\/\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/toolbox\\\/llm-api-token-cost-calculator\\\/\",\"name\":\"LLM API Token & Cost Calculator - Lukas Wojcik - Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\"},\"datePublished\":\"2026-08-14T23:16:52+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/toolbox\\\/llm-api-token-cost-calculator\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/toolbox\\\/llm-api-token-cost-calculator\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/toolbox\\\/llm-api-token-cost-calculator\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Toolbox\",\"item\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/en\\\/toolbox\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"LLM API Token &#038; Cost Calculator\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/\",\"name\":\"Lukas Wojcik - Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/#\\\/schema\\\/person\\\/895f7604f9b6b71aad9bba33af28d0f9\",\"name\":\"luky\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"url\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"contentUrl\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\",\"width\":424,\"height\":636,\"caption\":\"luky\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/lw-x2.jpg\"},\"sameAs\":[\"https:\\\/\\\/www.lukaswojcik.com\\\/blog\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"LLM API Token & Cost Calculator - Lukas Wojcik - Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/llm-api-token-cost-calculator\/","og_locale":"en_US","og_type":"article","og_title":"LLM API Token & Cost Calculator - Lukas Wojcik - Blog","og_description":"Works out what a language model costs per request, per month and at ten times the volume, splits input, cached input and output, and estimates tokens from a piece of text.","og_url":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/llm-api-token-cost-calculator\/","og_site_name":"Lukas Wojcik - Blog","og_image":[{"width":1200,"height":630,"url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/08\/og-default.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/llm-api-token-cost-calculator\/","url":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/llm-api-token-cost-calculator\/","name":"LLM API Token & Cost Calculator - Lukas Wojcik - Blog","isPartOf":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#website"},"datePublished":"2026-08-14T23:16:52+00:00","breadcrumb":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/llm-api-token-cost-calculator\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/llm-api-token-cost-calculator\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/llm-api-token-cost-calculator\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.lukaswojcik.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Toolbox","item":"https:\/\/www.lukaswojcik.com\/blog\/en\/toolbox\/"},{"@type":"ListItem","position":3,"name":"LLM API Token &#038; Cost Calculator"}]},{"@type":"WebSite","@id":"https:\/\/www.lukaswojcik.com\/blog\/#website","url":"https:\/\/www.lukaswojcik.com\/blog\/","name":"Lukas Wojcik - Blog","description":"","publisher":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.lukaswojcik.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.lukaswojcik.com\/blog\/#\/schema\/person\/895f7604f9b6b71aad9bba33af28d0f9","name":"luky","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","url":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","contentUrl":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg","width":424,"height":636,"caption":"luky"},"logo":{"@id":"https:\/\/www.lukaswojcik.com\/blog\/wp-content\/uploads\/2026\/07\/lw-x2.jpg"},"sameAs":["https:\/\/www.lukaswojcik.com\/blog"]}]}},"_links":{"self":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/pages\/10283","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/comments?post=10283"}],"version-history":[{"count":0,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/pages\/10283\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/pages\/38"}],"wp:attachment":[{"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/media?parent=10283"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lukaswojcik.com\/blog\/wp-json\/wp\/v2\/tags?post=10283"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}