nowfound

AI · June 17, 2024

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.

Visit github.com ↗Alternativestop 3% of June 2024

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 · ▲339

    The 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.

  • LLM Pricing2024 · ailesson.io · ▲178

    LLMs price comparison tool developed and updated by LLM

  • TokenCounter2024 · tokencounter.co · ▲117

    Count tokens and estimate costs for any AI model

  • Tokenomy.ai2025 · tokenomy.ai · ▲105

    See your LLM token bill before you hit send.

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

    Easily calculate the token count and cost of your GPT Prompt.

  • GPT Calculator2023 · ▲83

    Easily calculate the token count and cost of your GPT Prompt

More ai this month

the category →
  • Video model that turns script into viral social media videos

    AI · 18d ago · spira.ai

  • The browser where Claude Code and Codex work beside you

    AI · 18d ago · rill.love

  • Kolibri is Aleph Alpha

    AI · 19d ago · tej.as

  • Paintings by AI models: programs run through a simulation of oil paint.

    AI · 21d ago · stillwet.art

  • A real-time world model you can explore and change

    AI · 30d ago · world.pixverse.video

  • Beam.win▲378

    Run AI agents on one Mac and use its windows on another

    AI · 4d ago · beam.win

Source: Show HN post ↗ · launch text quoted in part

Launched alongside, June 2024

the whole month →
  • Pygma▲1,412

    AI copilot for Instagram

    AI · 2024 · pygma.me

  • Cello▲1,347

    Easiest way to add a referral program to your SaaS

    Growth · 2024 · cello.so

  • Create personalized, multi-channel conversations at scale

    AI · 2024 · lagrowthmachine.com

  • Revolutionary AI email, reimagined for teams

    AI · 2024 · superhuman.com

  • FlowMapp 3.0▲1,142

    Visual website planning in the most powerful way

    Work · 2024 · flowmapp.com

  • PyjamaHR▲1,132

    Hiring on autopilot. The AI applicant tracking system (ATS).

    Work · 2024 · pyjamahr.com