Skip to main content

Embedding Cost Calculator

Calculate the cost of generating embeddings from text or token counts.

Last Updated: July 26, 2026

Sample Text & Volume

Total Embedding Cost

$0.0004

Tokens / doc

18

Total tokens

18,000

Pricing verified 2026-07-26 directly from official provider docs. Providers change prices often — double-check before relying on this for budgeting. developers.openai.com/api/docs/pricing

What This Calculator Measures

Embeddings turn text into a vector of numbers that captures its meaning, used for search, recommendation, RAG (retrieval-augmented generation), and clustering. This calculator prices exactly how much it costs to embed your documents at scale.

Why Embeddings Are Priced Differently Than Chat Models

Embedding models only charge for input tokens — there's no "output" cost, because the model returns a fixed-size numeric vector rather than generated text. That makes embedding costs simpler to predict than chat completions: it's purely a function of how much text you feed in.

Tokenizer Detail That Matters Here

OpenAI's text-embedding-3-small and text-embedding-3-large models use the cl100k_base vocabulary — the same one used by GPT-4 and GPT-3.5, not the newer o200k_base vocabulary used by current chat models like GPT-5.x. This calculator tokenizes with the correct cl100k_base encoding specifically for embeddings, so the count is exact rather than a rough approximation.

The Math

total tokens = tokens per document × number of documents
total cost   = (total tokens / 1,000,000) × price per million tokens

Choosing Between Small and Large Embedding Models

  • text-embedding-3-small is far cheaper per token and works well for most semantic search and RAG use cases.
  • text-embedding-3-large produces higher-dimensional, more precise embeddings at roughly 6x the price — worth it when retrieval quality is the bottleneck, not usually worth it just to save engineering time.

Common Mistakes

  • Re-embedding unchanged content. If your documents don't change, embed once and store the vectors — don't re-embed on every query.
  • Forgetting chunking overhead. Splitting a long document into overlapping chunks increases total token count (and cost) versus embedding it once — factor your actual chunk count into "number of documents" here, not the original document count.

Frequently Asked Questions

Frequently Asked Questions

No — embedding models only charge for input tokens. The output is a numeric vector, not generated text, so there's no output token price.
OpenAI's text-embedding-3 models use the cl100k_base vocabulary (the same one GPT-4/3.5 used), which is different from the o200k_base vocabulary newer chat models use — this calculator counts with the correct one for an exact result.