Token price calculator for 400+ LLMs
Hey HN! Tokencost is a utility library for estimating LLM costs. There are hundreds of different models now, and they all have their own pricing schemes. It’s difficult to keep up with the pricing changes, and it’s even more difficult to estimate how much your prompts and completions will cost until you see the bill. Tokencost works by counting the number of tokens in prompt and completion messages and multiplying that number by the corresponding model cost. Under the hood, it’s really just a simple cost dictionary and some utility functions for getting the prices right. It also accounts for…
Token price calculator for 400+ LLMs launched on June 17, 2024 with 268 votes, #163 of 4,672 launches that month and more than 95% of that year's launches. The site was still online in September 2026, 2 years on.
In plain words
Tokencost is a utility library that estimates costs for using over 400 different large language models. It calculates expenses by counting tokens in prompts and completions, then multiplying by each model's pricing. The tool accounts for different tokenizers and handles precision errors that can skew calculations. It's designed for developers who need cost visibility before receiving billing statements, since most model providers don't report spending until bills arrive.
written from the facts on this page · September 2026
From the sources
Easy token price estimates for 400+ LLMs. TokenOps. - AgentOps-AI/tokencost
In the maker’s words, at launch
Hey HN! Tokencost is a utility library for estimating LLM costs. There are hundreds of different models now, and they all have their own pricing schemes. It’s difficult to keep up with the pricing changes, and it’s even more difficult to estimate how much your prompts and completions will cost until you see the bill.…
Does a similar job
all alternatives →
Price Per Token – LLM API Pricing Data2025 · pricepertoken.com · ▲339The LLM providers are constantly adding new models and updating their API prices. Anyone building AI applications knows that these prices are very important to their bottom line. The only place I am aware of is going to these provider's individual website pages to check the price per token. To solve this inconvenience I spent a few hours making pricepertoken.com which has the latest model's up-to-date prices all in one place. Thinking about adding image models too especially since you have multiple options (fal, replicate) to use the same model and the prices are not always the same.



GPT Calculator – Calculate the token count and cost of your GPT Prompt2023 · gptcalculator.xyz · ▲63Easily calculate the token count and cost of your GPT Prompt.

More ai this month
the category →



Paintings by AI models: programs run through a simulation of oil paint.
AI · 21d ago · stillwet.art
PixVerse R2▲381A real-time world model you can explore and change
AI · 29d ago · world.pixverse.video

Source: Show HN post ↗ · launch text quoted in part
Launched alongside, June 2024
the whole month →

La Growth Machine▲1,216Create personalized, multi-channel conversations at scale
AI · 2024 · lagrowthmachine.com


PyjamaHR▲1,132Hiring on autopilot. The AI applicant tracking system (ATS).
Work · 2024 · pyjamahr.com