Skip to main content

Still paying full price for ChatGPT Plus, Claude & Gemini?

Split the exact same subscriptions with GamsGo and cut your monthly AI bill by up to 80% — same accounts, a fraction of the cost.

See how much you save →
Sponsored

Gemini API Cost Calculator: Does Context Caching Actually Pay for Itself?

Google charges rent on a Gemini context cache. Storage bills by the hour whether anything reads the cache or not, so the question is not how often you hit it, it is whether you call often enough to cover the meter. Set your workload below and this Gemini API cost calculator prices realtime, batch and cached side by side.

Pricing last verified 2026-07-28, source: Gemini API pricing, ai.google.dev. Written by Jim Liu.

TL;DR

  • An explicit Gemini cache costs $1.00 per 1M tokens per hour on Flash tiers and $4.50 on Pro tiers, charged for as long as it exists
  • It pays for itself above roughly 0.7 requests per hour on 3.5 Flash, 2.5 on 3.1 Pro Preview, 3.7 on 2.5 Flash and 11 on 2.5 Flash-Lite, and that floor does not change with cache size
  • Batch halves input and output on every model, but the published batch caching rate is unchanged on the whole 2.5 line, on 3.1 Pro Preview and on 3 Flash Preview, so it is not a flat 50 percent
  • On 2.5 Pro and 3.1 Pro Preview, one token past 200,000 doubles the input rate for the whole prompt

Gemini API Cost Calculator

Model

Gemini 3 line

Gemini 2.5 line

Caching needs a prefix of at least 4,096 tokens. Below that nothing caches and no error is raised.

System prompt, tools, retrieved context and history combined

Output is never discounted by caching

Spread over a 30 day month

The part that stays byte identical across calls. One rotating request ID in there and none of it matches.

Storage bills at $1.00 per 1M tokens per hour on this tier, read or not.

Cheapest option for this workload

$838 /mo

Batch plus context cache, 78.6 percent under the uncached realtime baseline

Realtime baseline

$3924/mo

Cost per request

$0.0140

Batch plus context cachecheapest

$838/mo

$828 tokens plus $10.08 cache storage. Both discounts stacked. Storage is still billed in full.

Realtime plus context cache

$1666/mo

$1656 tokens plus $10.08 cache storage. Cached prefix bills at the caching rate, plus storage for the hours it stays alive.

Batch, no cache

$1962/mo

$1962 tokens. Half the token cost, results within a 24 hour turnaround.

Realtime, no cache

$3924/mo

$3924 tokens. Baseline. Every input token bills at the standard rate.

Does the cache cover its own storage

Yes. You run 167 requests per hour while the cache is alive, against a floor of 0.7 on 3.5 Flash.

The floor is $1.00 storage divided by the $1.350 saved per 1M cached tokens. It does not move when the cache gets bigger, only when the tier changes. On the published batch rates the same floor is 1.5 requests per hour, because batch halves the input rate without always halving the caching rate.

How Gemini Bills a Context Cache, and Why the Clock Matters

Context caching in the Gemini API stores a reusable prefix, usually a system prompt, a tool schema, or a retrieved document, so later calls do not reprocess it from scratch. Google bills that in two separate lines. Cached tokens read back are charged at the published context caching rate, roughly one tenth of the standard input rate. Then, separately, the cache object itself is charged for storage at $1.00 per 1M tokens per hour on the Flash and Flash-Lite tiers and $4.50 per 1M tokens per hour on Gemini 2.5 Pro and Gemini 3.1 Pro Preview.

That second line is the one people miss, and it is why this Gemini API cost calculator asks how many hours a day the cache stays alive rather than asking for a hit rate. Storage accrues on wall-clock time. A cache holding a 500,000 token handbook on a Pro tier runs about $2.25 an hour, which is roughly $54 a day and $1,620 a month, before a single request reads it. If the traffic that was supposed to amortize that never shows up, the cache is a subscription you forgot to cancel.

Implicit caching works differently and is worth knowing about before you reach for the explicit kind. Google enables it by default on Gemini 2.5 and newer models and applies the discount automatically when a prefix happens to repeat. You create nothing, you manage nothing, and critically you pay no storage. Explicit caching is the mode where you create a cache object, name it in later requests, and take on the hourly charge in exchange for a guarantee that the discount applies.

  • Prices verified 2026-07-28 against Google's published pricing page
  • Cached token rate at standard pricing: exactly one tenth of the standard input rate on every tier listed. The batch column does not keep that ratio
  • Cache storage: $1.00 per 1M tokens per hour on Flash, $4.50 on Pro
  • Output tokens: never discounted by caching
  • Google publishes no separate cache creation premium, so this calculator does not invent one

The Minimum Request Rate That Makes an Explicit Cache Pay

Every cached token saves you the difference between the standard input rate and the caching rate. Every cached token also costs you the storage rate for each hour it sits there. Set those equal and the token count cancels out on both sides, which leaves a threshold measured in requests per hour rather than dollars. For a storage rate s, a standard input rate i and a cached rate c, the floor is s / (i - c) requests per hour.

The cancellation is the useful part. It means a 4,000 token cache and a 4,000,000 token cache have exactly the same break-even request rate on the same model. Cache size changes how much you win or lose, never whether you win. What changes the floor is the tier, and the spread across tiers is wide enough to flip decisions.

ModelStorage per 1M per hourSaved per 1M cachedRequests per hour to break evenSame floor on batch rates
Gemini 3.6 Flash$1.00$1.3500.71.5
Gemini 3.5 Flash$1.00$1.3500.71.5
Gemini 3 Flash Preview$1.00$0.4502.25.0
Gemini 3.5 Flash-Lite$1.00$0.2703.77.7
Gemini 3.1 Flash-Lite$1.00$0.2254.44.4
Gemini 3.1 Pro Preview$4.50$1.8002.55.6
Gemini 2.5 Pro$4.50$1.1254.09.0
Gemini 2.5 Flash$1.00$0.2703.78.3
Gemini 2.5 Flash-Lite$1.00$0.0901125

Gemini 2.5 Flash-Lite is the outlier worth staring at. Its token rate is so low that the saving per cached token is tiny, while storage costs the same dollar amount as it does on the Flash tiers. You need about eleven calls an hour, sustained, before an explicit cache stops losing money there. On Gemini 3.5 Flash the same arithmetic gives you well under one call an hour, so almost any live workload clears it. Two models, same feature, opposite advice. That is the number the Gemini API cost calculator above reports back as a plain yes or no for your own request volume.

The last column is where it gets awkward. Batch halves the input rate on every model, which shrinks the per-request saving, while the storage rate mostly stays put. The floor therefore goes up in batch, sometimes a lot: Gemini 2.5 Flash needs about four calls an hour in realtime and about eight in batch, and Gemini 2.5 Flash-Lite goes from about eleven to about twenty five. Moving a job to batch to save money can quietly turn a cache that was paying for itself into one that is not.

The 200,000 Token Price Cliff on Pro Models

Gemini 2.5 Pro and Gemini 3.1 Pro Preview publish two sets of rates split at 200,000 prompt tokens. On 3.1 Pro Preview, input goes from $2.00 to $4.00 per 1M and output goes from $12.00 to $18.00. On 2.5 Pro it is $1.25 to $2.50 and $10.00 to $15.00. The higher rate applies to the entire prompt once you cross, not to the overflow, so the bill steps rather than slopes.

This is a quiet failure mode in retrieval pipelines. Nobody sets out to send a 210,000 token prompt. The corpus grows, the retriever returns one more chunk, and a slice of production traffic silently moves into the higher bracket. Same code, same model, larger invoice. The Gemini API cost calculator above flags the crossing and shows how far past the line you are, which is why it takes a token count rather than a vague size label.

The Flash and Flash-Lite tiers publish a single flat rate with no threshold at all, which is worth remembering when you are choosing where to put a long-context workload. Splitting one oversized request into two under-threshold requests can genuinely cost less on Pro, at the price of whatever coherence you lose by splitting.

Batch Mode: Half Price for Work Nobody Is Waiting On

Google prices the Batch API at 50 percent of the standard interactive cost for the equivalent model, and states that batch jobs are designed to complete within a 24 hour turnaround, with many finishing well before that. You submit the same model with the same parameters through an asynchronous path and collect the results when the job finishes.

The 50 percent summary is accurate for input and output, and only for input and output. Read the batch column on each model and the caching rows tell a different story. Google prints the words "Same as Standard" in the batch caching cell for Gemini 3.1 Pro Preview and Gemini 3 Flash Preview, and the whole 2.5 line repeats its standard caching rate unchanged, so on five of the nine models here batch buys you nothing at all on cached tokens. Gemini 3.6 Flash, 3.5 Flash and 3.1 Flash-Lite do halve theirs, and 3.5 Flash-Lite lands at $0.02 against a standard $0.03. Storage is discounted on exactly one model, Gemini 3.1 Flash-Lite, at $0.50 against $1.00. This calculator reads every one of those numbers literally instead of deriving them from the headline rule, which is why the cached batch row can come out higher than a halving would suggest.

Caching and batching stack. Google's Batch API documentation states that context caching is supported for batch requests, by naming the cached content resource in the configuration of individual requests inside the batch. That combination is usually the cheapest row this Gemini API cost calculator produces, though on the 2.5 line and on both Preview tiers the cached portion of the prompt costs the same either way, so the saving comes entirely from the uncached remainder and the output.

The honest limit of batch is latency. Google positions it for non-urgent work, and a turnaround measured in hours rules it out for anything a person is waiting on, at which point the comparison collapses back to realtime with or without a cache.

Which Billing Mode Fits Your Workload

The Gemini API cost calculator above ranks these four by dollars. This table is the part dollars cannot tell you: what each mode costs you in flexibility, and who should stay away from it.

ModeWhat it changesBest forNot ideal for
Realtime, no cacheNothing. Standard rates, no moving parts.Low volume, prompts that never repeatNot ideal for anything that resends the same large prefix all day
Implicit cachingAutomatic discount when a prefix happens to repeat. No storage charge.Anyone on Gemini 2.5 or newer, since there is no storage charge to lose onNot ideal when you need certainty. Google states implicit caching carries no cost saving guarantee
Explicit cacheGuaranteed discount on a named cache, plus an hourly storage charge.Sustained traffic against one fixed corpus, above the rate floorNot ideal for bursty or overnight-quiet traffic, where storage runs while you sleep
Batch APIHalf the input and output rate, results within a 24 hour turnaround.Queues, bulk extraction, scheduled reports, offline evaluationNot ideal for anything a user is waiting on, at any volume
Batch plus cacheBoth discounts, where the model actually publishes a batch caching discount.Large offline jobs on the 3.5 or 3.6 Flash tiers that share one prefixNot ideal on the 2.5 line or either Preview tier, where batch caching costs the same as realtime caching

Related pricing tools on OpenAI Tools Hub

Published Gemini Prices Behind This Calculator

ModelInputOutputCached inputStorage per hourBatch cachedBatch storageCache minimum
Gemini 3.6 Flash$1.50$7.50$0.150$1.00$0.0750$1.00not published
Gemini 3.5 Flash$1.50$9.00$0.150$1.00$0.0750$1.004,096 tokens
Gemini 3 Flash Preview$0.50$3.00$0.050$1.00$0.0500 (same as realtime)$1.00not published
Gemini 3.5 Flash-Lite$0.30$2.50$0.030$1.00$0.0200$1.00not published
Gemini 3.1 Flash-Lite$0.25$1.50$0.025$1.00$0.0125$0.50not published
Gemini 3.1 Pro Preview$2.00 / $4.00$12.00 / $18.00$0.200 / $0.400$4.50$0.2000 / $0.4000 (same as realtime)$4.504,096 tokens
Gemini 2.5 Pro$1.25 / $2.50$10.00 / $15.00$0.125 / $0.250$4.50$0.1250 / $0.2500 (same as realtime)$4.502,048 tokens
Gemini 2.5 Flash$0.30$2.50$0.030$1.00$0.0300 (same as realtime)$1.002,048 tokens
Gemini 2.5 Flash-Lite$0.10$0.40$0.010$1.00$0.0100 (same as realtime)$1.00not published

These are the exact numbers the Gemini API cost calculator on this page reads from. All figures are per 1,000,000 tokens on the paid tier, in USD. Where two values appear, the first applies to prompts at or below 200,000 tokens and the second above it. Models that price audio separately are shown at the text, image and video rate. Pricing last verified 2026-07-28 against the Gemini API pricing page and the context caching documentation. Google changes these often, so check both before you commit a budget.

Six Worked Scenarios, Priced End to End

Each card runs a realistic workload through the same Gemini API cost calculator logic across all four billing modes, and shows the winner. Filter by shape, sort by whichever number you care about, then load one into the calculator above and change a single input to see what moves.

J

Jim Liu

Builds and ships AI tooling, and writes token-budgeting and cost-optimization guidance for teams running production LLM pipelines. Built this Gemini API cost calculator after watching an idle explicit cache outspend the traffic it was meant to serve. Publishes tools and analysis at OpenAI Tools Hub.

Frequently Asked Questions

How much does the Gemini API cost per 1M tokens?v

It depends on the tier. As published on Google's pricing page, Gemini 2.5 Flash-Lite is $0.10 per 1M input tokens and $0.40 per 1M output tokens, Gemini 2.5 Flash and Gemini 3.5 Flash-Lite are $0.30 input, Gemini 3.5 and 3.6 Flash are $1.50 input, and Gemini 3.1 Pro Preview is $2.00 input for prompts at or below 200,000 tokens. Output rates run from $0.40 to $18.00 per 1M depending on tier and prompt size. The table on this page lists every model with its caching and storage rates alongside, and the Gemini API cost calculator above turns those rates into a monthly figure for your own request volume.

Is Gemini context caching worth it?v

Only above a certain request rate, and the threshold is lower than most people assume. Because Google bills cache storage per hour, an explicit cache has a running cost even when nothing reads it. Divide the storage rate by the per-token saving and you get a minimum request rate: about 0.7 requests per hour on Gemini 3.5 Flash, about 2.5 on Gemini 3.1 Pro Preview, about 3.7 on Gemini 2.5 Flash, and about 11 on Gemini 2.5 Flash-Lite. Below that rate the storage charge eats the discount and you would be better off sending the prompt uncached.

How much does Gemini cache storage cost per hour?v

Google publishes $1.00 per 1M tokens per hour on the Flash and Flash-Lite tiers, and $4.50 per 1M tokens per hour on Gemini 2.5 Pro and Gemini 3.1 Pro Preview. That charge accrues for as long as the cache object exists, regardless of whether anything reads it. A 1M token cache held on a Pro tier for a full day is about $108 in storage before a single request touches it.

Why did my Gemini API bill go up after I enabled context caching?v

The usual cause is an explicit cache that stays alive far longer than the traffic justifies. Storage bills by the hour whether or not anything reads the cache, so a cache held for 24 hours a day against a few hundred requests a month is pure overhead. The second common cause is prefix drift: a timestamp, a rotating request ID, or an unsorted JSON key anywhere in the supposedly reusable prefix means nothing matches, every call bills at the standard input rate, and you still pay storage on top.

Why does my Gemini bill double above 200k tokens?v

Gemini 2.5 Pro and Gemini 3.1 Pro Preview publish two rate tiers split at 200,000 prompt tokens. On 3.1 Pro Preview the input rate goes from $2.00 to $4.00 per 1M and output goes from $12.00 to $18.00 once a single prompt crosses the line. The jump applies to the whole prompt, not just the tokens past the threshold, so a retrieval pipeline that quietly grew its context can double its input bill without any code change. The Flash and Flash-Lite tiers publish a single flat rate with no threshold.

Does the Gemini Batch API really cost 50 percent less?v

On input and output, yes. Google states the Batch API is priced at 50 percent of the standard interactive cost, and every model on this page does show exactly half the standard input and output rate in its batch column. The caching rows are where the summary breaks down. Google prints the words "Same as Standard" in the batch caching cell for Gemini 3.1 Pro Preview and Gemini 3 Flash Preview, and the entire 2.5 line repeats its standard caching rate unchanged, so on those five models batch buys you nothing on cached tokens. Gemini 3.6 Flash, 3.5 Flash and 3.1 Flash-Lite do halve theirs, and 3.5 Flash-Lite lands in between at $0.02 against $0.03. Storage is discounted on exactly one model, Gemini 3.1 Flash-Lite, at $0.50 against $1.00. This calculator reads all of those literally rather than deriving them, so the cached batch rows are right even where the 50 percent rule is not.

Can I use context caching with the Batch API?v

Yes. Google's Batch API documentation states that context caching is supported for batch requests and that you reuse cached content by naming the cached_content resource in the configuration of individual requests inside the batch. Stacking both is usually the cheapest combination this calculator models, though it only helps if your prefix genuinely repeats across the queue. Worth checking the numbers rather than assuming: on the whole 2.5 line, and on Gemini 3.1 Pro Preview and Gemini 3 Flash Preview, the published batch caching rate is identical to the realtime one, so batch buys you nothing extra on the cached portion of the prompt. The saving there comes only from the uncached remainder and the output tokens.

What is the minimum token count before Gemini caching works?v

Google documents a per-model minimum: 4,096 tokens on Gemini 3.5 Flash and Gemini 3.1 Pro Preview, and 2,048 tokens on Gemini 2.5 Flash and Gemini 2.5 Pro. A shorter prefix simply does not cache, with no error to tell you so. Implicit caching is on by default for Gemini 2.5 and newer models and applies its discount automatically, while explicit caching is the mode you create and pay storage on.

Related Tools

Sponsored

Ad served by Adsterra. OpenAIToolsHub is not responsible for advertiser content.