Tool · Live

Bayanat Labs Arabic Token-Tax Calculator

LLM APIs bill and limit by tokens, and the same content usually takes more tokens in Arabic than in English: on the UN test set of the Arabic Token-Tax Index, the median Arabic/English token ratio across its tokenizers is 1.42. The calculator shows the difference for your own text. Paste Arabic text, and its English translation if you have one, and see for each tokenizer the token count, tokens per word, the Arabic/English token ratio, characters per token, whether the text fits a context budget, and the cost of sending or generating it at list prices read from the vendors' price pages on 30 October 2026, which you can edit. The calculator page runs 9 tokenizers in your browser; your text stays on the page, which may connect only to its own origin and stores nothing. The command-line tool token-tax runs 12 tokenizers at pinned revisions and gives the same token ids.

By Bayanat Labs· Updated · Apache-2.0· اقرأ بالعربية
LicenceApache-2.0 (code and calculator page); CC BY 4.0 (fixtures, price table and documentation); tokenizer files keep their own licences (MIT or Apache-2.0)
Versionv0.1.0 · Code, fixtures and calculator page v0.1.0, tagged on GitHub. Not on PyPI yet.
Published
Updated
Who it is forDevelopers and teams who send Arabic text to LLM APIs and want to know, before they do, how many tokens it takes with each tokenizer, whether it fits a context window and what it costs.
LevelBeginner

Arabic token counter Arabic tokenizer LLM token cost token calculator Arabic NLP

Key numbers

12tokenizers in the command-line tool, at pinned revisions
120fixture texts, each with an English parallel
242texts with identical token ids in the browser and in Python, for each browser tokenizer
11edge-case strings with identical token ids, for each browser tokenizer
7list prices from the price pages of OpenAI, DeepSeek and Alibaba Cloud, read on 30 October 2026, editable; one is a promotional price and is marked as such
1.42median Arabic/English token ratio on the UN test set of the Arabic Token-Tax Index
5242906bytes of text measured in the browser privacy check
0requests outside the page's own origin during that check

Counted by script from the released files. Each key number is counted from a file released at tag v0.1.0 (the tokenizer registry, the price table, the fixtures and the browser parity report docs/parity-v0.1.0.json) and pinned to its SHA-256; the median ratio comes from the Arabic Token-Tax Index. The calculator page's MANIFEST.json lists every file it serves with its SHA-256.

Downloads and identifiers

Get started

Install the command-line tool from GitHub at the v0.1.0 tag; the package is not on PyPI yet. The calculator page needs no install.

pip install "git+https://github.com/Bayanat-Labs/arabic-token-tax-calculator@v0.1.0"

token-tax count "قالت البلدية إن أعمال صيانة الطريق الساحلي ستستمر ثلاثة أسابيع" \
  --en "The municipality said that maintenance work on the coastal road will continue for three weeks"
token-tax count --file ar.txt --en-file en.txt --tokenizers o200k_base,qwen3.5 --budget 8192
token-tax count --file ar.txt --json
token-tax tokenizers

What is released

PartLicenceIn this release
Calculator page on Hugging Face Spaces: 9 tokenizers that run in your browser, interface in English and ArabicApache-2.0Yes
Python library and command-line tool (token-tax), for Python 3.10 or laterApache-2.0Yes
Fixture texts, price table, method and documentationCC BY 4.0Yes
Tokenizer files served by the calculator page: OpenAI o200k_base and cl100k_base, Qwen3, Qwen3.5 / 3.6 / 3.8, DeepSeek V3 / V4, Mistral Tekken, Gemma 4 / Fanar-2, ALLaM, Fanar-1Each file keeps its own licence, MIT or Apache-2.0, listed with the releaseYes
IBM Plex Sans Arabic font in the calculator page, unmodified (SIL Open Font License 1.1)SIL Open Font License, copyright IBM Corp.Yes

Attribution: Arabic Token-Tax Calculator (token-tax) by Bayanat Labs. https://github.com/Bayanat-Labs/arabic-token-tax-calculator

Intended uses

  • Estimate the tokens, context use and cost of an Arabic text with a given tokenizer before you send it.
  • Compare tokenizers on your own Arabic text and its English parallel.
  • Check token counts in scripts and continuous integration with the command-line tool's JSON output.

Out of scope

  • Judging model quality: fewer tokens means lower cost and more text per context window, not a better model.
  • Billing: costs are estimates at list prices; a service's bill also counts chat formatting, system prompts and discounted rates.

Rights at a glance

Training, display, redistribution and synthetic-voice use are separate permissions.

UseStatusNote
TrainingNot applicableA calculator, fixtures and a price table, not training data. The fixtures are CC BY 4.0 if you reuse them.
DisplayAllowedFixtures, price table and documentation under CC BY 4.0, with attribution.
RedistributionAllowedCode under Apache-2.0; fixtures, price table and documentation under CC BY 4.0; tokenizer files under their own licences (MIT or Apache-2.0); the bundled font under the SIL Open Font License.
Synthetic voiceNot applicableNo audio.

Limitations

  • Tokens per word overstate the gap between the languages, because Arabic clitics stay attached to their words; quote the Arabic/English ratio on the same content.
  • Counts exclude special tokens and the chat formatting a service adds.
  • List prices were read from the vendors' price pages on 30 October 2026 and change; one of them is a promotional price and is marked as such. Edit them or add your own.
  • Falcon3, Falcon-H1 and Falcon-H1R run in the command-line tool only.
  • The fixtures were written for this tool with fictional names and amounts; the dialect rows are illustrative.
  • Install the command-line tool from GitHub for now; the package is not on PyPI yet.

Sources and licences

SourceLicenceRedistributed here
Arabic Token-Tax Index 0.1.0: tokenizer set, pinned revisions and the priced modelsCC BY 4.0 (index data); Apache-2.0 (harness)Yes
Official price pages of OpenAI, DeepSeek and Alibaba Cloud, read on 30 October 2026Prices recorded as facts with the page URL, the time read and the SHA-256 of the page; the pages themselves are not includedYes
Tokenizer files from the model developers' repositories, at pinned revisions: OpenAI o200k_base and cl100k_base, Qwen3, Qwen3.5 / 3.6 / 3.8, DeepSeek V3 / V4, Mistral Tekken, Gemma 4 / Fanar-2, ALLaM, Fanar-1, Falcon3, Falcon-H1 and Falcon-H1REach file under its own licence; the calculator page includes only files under MIT or Apache-2.0, and the command-line tool downloads the others on first useYes

Tokenizers, revisions and the priced models come from the Arabic Token-Tax Index 0.1.0; the prices were read again from the vendors' official price pages on 30 October 2026, and a promotional price is marked as such. Each tokenizer file is checked by SHA-256 before use. The fixtures were written for this tool, with fictional names and amounts. Source details

How to cite

Cite as:

Bayanat Labs (2026). Arabic Token-Tax Calculator, version 0.1.0. Bayanat Labs. https://github.com/Bayanat-Labs/arabic-token-tax-calculator

No DOI. Cite the URL in the citation above and the date you read it.

@misc{bayanatlabs2026tokentaxcalculator,
  author       = {{Bayanat Labs}},
  title        = {Arabic Token-Tax Calculator, version 0.1.0},
  year         = {2026},
  month        = oct,
  howpublished = {\url{https://github.com/Bayanat-Labs/arabic-token-tax-calculator}}
}

How we handle citations

Changelog

DateVersionChange
v0.1.0Calculator page in English and Arabic on Hugging Face Spaces; Python library, command-line tool, fixtures and method on GitHub.

Corrections and removal requests

If something in this release should not be there, or is wrong, email hello@bayanatlabs.com. We handle removal requests within 30 days, and platform requests within 24 hours. How removal requests work

Related product: Bayanat Bench

Need production-grade, rights-cleared data?

We publish synthetic fixtures, open benchmarks, results, code and guides for free. Data at scale is licensed or built to order: ready-to-license Arabic speech and text datasets with commercial AI-use rights written into the agreement, and custom collection, annotation and evaluation.

Bayanat Bench: Compare model versions using the language, documents, and tasks your users rely on. License Arabic evaluation data or build a private suite around your product.