Toolivaro

AI-Token-Zähler kostenlos

Schätze Tokens und API-Kosten für jeden Prompt — für GPT-4o, Claude Sonnet 4 und andere Modelle — komplett lokal.

Der AI-Token-Zähler schätzt, wie viele Tokens ein Prompt bei OpenAI- und Anthropic-Modellen verbraucht, und rechnet das in eine API-Kostenschätzung um. Füge einen Prompt, eine Systemnachricht oder einen Codeblock ein, wähle eine Modellfamilie, und das Tool liefert eine geschätzte Eingabe-Token-Anzahl, einen Kontextfenster-Check und — wenn du eine erwartete Ausgabelänge angibst — eine kombinierte Eingabe-plus-Ausgabe-Kostenschätzung. Die Schätzung nutzt die von den Anbietern selbst dokumentierte Faustregel von etwa einem Token pro vier Zeichen englischen Texts; sie ist eine Näherung, nicht der exakte Tokenizer des Modells, und sie ist bewusst am schwächsten bei nicht-englischem Text, dichter Interpunktion und Code. Die Preise sind die öffentlichen Listenpreise, Stand 2026-08-05, und werden mit ihrem Stichtag angezeigt, damit eine Preisänderung beim Anbieter dich nie stillschweigend in die Irre führt. Alles läuft lokal: der Prompt, den du einfügst, verlässt dein Gerät nie — wichtig, wenn der Text proprietären Code oder sensible Daten enthält. Nutze dieses Tool vor einem Batch-Job, um die Kosten grob zu prüfen, beim Vergleich von Modellfamilien für eine Aufgabe oder wenn eine Kontextfenster-Fehlermeldung zeigt, dass ein Prompt zu groß ist, um ihn von Hand zu zählen.

Wird lokal in deinem Browser verarbeitet

Optional — wird zur Schätzung der Ausgabe-Token-Kosten verwendet.

So verwenden Sie diesen Rechner

What a token is, and why the count is an estimate

A token is the unit a language model reads and writes: roughly a word, a sub-word, or a punctuation mark, depending on the model’s vocabulary. Models are billed per token, and their context windows are measured in tokens, which is why the number matters before you send a prompt. The tool estimates the count with the vendors’ own documented heuristic — about one token per four characters of English text — rather than each model’s exact tokenizer, whose BPE vocabulary is far too large to ship in a static page.

The estimate is calibrated for English prose. Non-English text, dense punctuation, code with long identifiers, and tables all tokenize differently, and the page says so plainly: for billing-critical counts the vendor tokenizer is authoritative, and this tool is for planning — sanity-checking spend before a batch job, comparing model families, or finding out why a prompt overflowed its context window.

Estimating cost before you commit

Cost is two numbers, not one: input tokens and output tokens, and they are billed at different rates — output almost always costs more per token. The tool asks for an expected output length when you want the full picture, estimates output tokens at roughly 0.75 words per token, and combines both sides at the model’s public list prices.

The prices are shown with the date they were recorded (2026-08-05) because model pricing changes — a rate update at the vendor is never silently baked into an estimate. When you are planning a real workload, confirm the current rates on the vendor’s pricing page; the tool’s job is the arithmetic, not the price forecast.

Choosing a model family for the job

The counter lets you compare models side by side: the same prompt can be 250 tokens on one family and 220 on another, and the input cost per million tokens differs enough that the comparison changes real decisions about batch size and routing. Run the same prompt across the families you are considering and read the combined cost — that is the number that belongs in a budget review, not the token count alone.

The context-window check is the other side of the comparison: a prompt that fits comfortably in one family’s window may not fit a smaller-window model at all, and the tool flags that before you discover it in an API error.

The local promise

Prompts you paste here often contain proprietary code, unpublished plans, or personal data — exactly the text you should not send to a third-party tokenizer. Everything runs in your browser: the estimate is computed locally, nothing is uploaded, logged, or stored, and there is no server that could see the text. The trade is the one disclosed above: the count is the documented heuristic rather than the exact vocabulary, which is the honest price of keeping the prompt on your device.

Wie wird das Ergebnis berechnet?

Ein Systemprompt mit 200 Wörtern auf GPT-4o

Ein Systemprompt mit 1.000 Zeichen wird auf GPT-4o auf 250 Tokens geschätzt (4 Zeichen pro Token). Bei 2,50 $ pro Million Eingabe-Tokens kostet die Eingabe etwa 0,0006 $; eine gewünschte Antwort mit 200 Wörtern (≈ 267 Ausgabe-Tokens bei 10 $ pro Million) bringt die Gesamtsumme auf etwa 0,0033 $ pro Aufruf.

Beispieleingabe und -ausgabe
Eingabe Wert
prompt 1,000-character system prompt
model GPT-4o
outputWords 200
Ergebnis ≈ 250 Eingabe-Tokens · ≈ 267 Ausgabe-Tokens · ≈ $0.0033 pro Aufruf

Wie lautet die Formel und ihre Annahmen?

Token-Schätzung

tokens ≈ ceil(characters ÷ 4)

Formelbegriffe
Symbol Bedeutung
characters Länge des Prompt-Texts (Codepunkte)
4 vom Anbieter dokumentierte Näherung: ~4 Zeichen pro Token (Englisch)

Eine Schätzung, nicht die exakte Tokenizer-Ausgabe. Exakte Anzahlen erfordern das BPE-Vokabular jedes Modells, das nicht in eine statische Seite passt.

Kostenschätzung

cost = (inputTokens ÷ 1,000,000 × inputPrice) + (outputTokens ÷ 1,000,000 × outputPrice)

Formelbegriffe
Symbol Bedeutung
inputPrice Listenpreis pro Million Eingabe-Tokens (Stand 2026-08-05)
outputPrice Listenpreis pro Million Ausgabe-Tokens (Stand 2026-08-05)

Ausgabe-Tokens werden auf etwa 0,75 Wörter pro Token geschätzt, wenn du eine erwartete Ausgabelänge angibst.

Welche Fehler sind am häufigsten?

  • Die Schätzung als exakte Abrechnungsanzahl zu behandeln — für die Abrechnung sind die Tokenizer der Anbieter maßgeblich.
  • Bei nicht-englischem Text vier Zeichen pro Token anzunehmen — die Faustregel ist für Englisch kalibriert.
  • Zu vergessen, dass Ausgabe-Tokens pro Token meist teurer sind als Eingabe-Tokens.
  • Sensiblen proprietären Code in einen Online-Tokenizer einzufügen — dieses Tool hält alles lokal.

Welche Annahmen und Grenzen gelten?

  • Die Schätzung ist heuristisch (Zeichen ÷ 4), nicht die exakte Tokenizer-Ausgabe des Modells; die Genauigkeit sinkt bei nicht-englischem Text, dichter Interpunktion und Code.
  • Die Preise sind öffentliche Listenpreise Stand 2026-08-05 und können sich ändern; bestätige vor verbindlichen Ausgaben immer die Preis-Seite des Anbieters.
  • Kontextfenster und Preise gelten für die gelisteten Modellnamen zum erfassten Datum; ein Modell-Update kann beide ändern.

Woher stammen die Zahlen?

Zuletzt geprüft 5. August 2026 · Version 1.0.0 · Toolivaro garantiert keine externen Inhalte.

Häufig gestellte Fragen

Warum ist die Anzahl eine Schätzung statt exakt?

Exakte Token-Anzahlen kommen vom Tokenizer jedes Modells, einem BPE-Vokabular, das in den Bibliotheken des Modellanbieters steckt — zu groß, um in eine statische Seite eingebettet zu werden. Die dokumentierte Faustregel von etwa 4 Zeichen pro Token liegt bei typischen englischen Prompts innerhalb weniger Prozent — genau genug für Kosten- und Kontextplanung.

Stimmt die Anzahl mit den OpenAI- oder Anthropic-Tokenizer-Seiten überein?

In etwa, aber nicht identisch. Die offiziellen Tokenizer verwenden das echte Vokabular und sind exakt; dieses Tool nutzt die dokumentierte Faustregel, damit es vollständig in deinem Browser läuft. Für abrechnungskritische Anzahlen nutze den Tokenizer des Anbieters — die Schätzung hier ist für die Planung gedacht.

Warum sind die Preise datiert?

Modellpreise ändern sich. Das Tool erfasst die öffentlichen Listenpreise, gegen die es gebaut wurde (2026-08-05), und zeigt dieses Datum bei jedem Ergebnis, damit eine spätere Preisänderung beim Anbieter nie stillschweigend in eine Schätzung einfließt.

Does the tool count output tokens for me?

Only when you provide an expected output length. Output tokens are estimated at roughly 0.75 words per token and combined with input cost at the model’s output rate. Without a length, the tool reports input cost alone.

Why is my code tokenized so differently from my prose?

Tokenizer vocabularies are trained on the language they see most: prose-heavy text tokenizes near the four-characters-per-token average, while code and non-English text drift from it. That is the main reason the estimate is an approximation rather than an exact count.

Teil von Text- und JSON-Werkzeuge für Entwickler

Fehler gefunden oder eine Korrektur? Melde ihn — jede Korrektur wird geprüft.

War dieses Werkzeug hilfreich?

Überprüft vom Toolivaro-Redaktionsteam gemäß unserer Methodik Methodik · Redaktionsrichtlinie