Embedding Cost Calculator
Calculate the cost of generating embeddings for a corpus of text using popular embedding model pricing.
Inputs
Total Embedding Cost
$0.2000
Price per 1M Tokens
$0.02
Cost per 1K Tokens
$0.000020
Step by step
Price per token: price per 1M tokens ÷ 1,000,000
$0.02 ÷ 1,000,000
= $0.000000020
Total cost: total tokens × price per token
10,000,000 × $0.000000020
= $0.2000
How it works
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
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.