Embedding Cost Calculator
Calculate the API cost of generating embeddings for a given amount of text.
About Embedding Cost Calculator
Embedding APIs price by input token count, just like chat completion input tokens: total_cost = total_tokens × price_per_token. Unlike chat models, embedding models have no separate 'output' token cost since the output is a fixed-size vector rather than generated text. Embedding an entire corpus for RAG is typically a one-time (or periodic, on re-indexing) cost, which is usually far smaller than the ongoing cost of querying an LLM — but for very large corpora (millions of documents) it's still worth budgeting for upfront.
Formula
total_cost = total_tokens * (price_per_million / 1000000)
- total_tokens
- Total tokens to embed across the corpus
- price_per_million
- Model's price per 1 million tokens
Worked example
With the default values below, Embedding Cost Calculator returns Total Embedding Cost of $0.2000. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Total Tokens to Embedaccepts 0–1,000,000,000,000 tokens
- 10,000,000 tokens
- Embedding Modelone of text-embedding-3-small ($0.02/1M), text-embedding-3-large ($0.13/1M), text-embedding-ada-002 ($0.10/1M)
- text-embedding-3-small ($0.02/1M)
Results
- Total Embedding Cost
- $0.2000
- Price per 1M Tokens
- $0.02
- Cost per 1K Tokens
- $0.000020
Step by step
- 1Price per token: price per 1M tokens ÷ 1,000,000= $0.000000020
- 2Total cost: total tokens × price per token= $0.2000
Assumptions and limits
- The result is derived only from the 2 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 6 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
Is embedding cost a one-time or recurring cost?
It's largely a one-time cost when you first index a corpus, though it recurs whenever you re-embed updated or newly added documents, or if you switch to a different/better embedding model and need to re-index everything.
Why is text-embedding-3-large more expensive than -small?
The 'large' variant produces higher-dimensional, more accurate embeddings using a bigger underlying model, which costs more compute to run and is priced accordingly higher per token than the smaller, faster variant.
How do I estimate total tokens for my corpus?
Use the Token Calculator on representative samples of your documents, then multiply the average tokens per document by your total document count, or sum tokens directly if you have exact text extracted.
Does chunking affect embedding cost?
Total token count embedded stays roughly the same regardless of chunk size (the same text gets embedded either way), but smaller chunks mean more separate embedding calls and vectors stored, which affects storage cost more than embedding cost.
