Gemini 3.1 Pro token & cost calculator
Gemini 3.1 Pro is Google's current flagship Gemini model — the high-capability Pro tier, carrying a 1,000,000-token context window and Google's signature two-tier pricing: $2 input / $12 output per million at or below 200,000 input tokens, stepping up to $4 / $18 for any request that crosses that threshold. It supersedes Gemini 2.5 Pro, which stays available at a lower rate.
The tier boundary is the thing to plan around. At 200K tokens — one-fifth of the way into the context window — the whole request re-rates to roughly double the input price. So Gemini 3.1 Pro rewards keeping prompts lean and punishes sprawling context in a way flat-priced models like GPT-4.1 don't. If your workload lives above 200K, model the upper tier as your real rate.
Saved scenariosnone yet
Saved on this browser only — never uploaded. Up to 10 scenarios.
Tip: save a scenario when you have a prompt + model + response length you might revisit. Useful for sizing features before committing to a vendor.
Verify privacysince this page loaded — updates live
Open DevTools → Network. Type into the calculator. No request bodies should contain your prompt text.
Pricing
Gemini 3.1 Pro is tier-priced on input size. The calculator picks the right tier automatically; the breakdown is below.
| Tier | Input $/M | Output $/M |
|---|---|---|
| ≤ 200,000 input tokens | $2 | $12 |
| All input | $4 | $18 |
| Context window | 1,000,000 tokens | |
Verified against ai.google.dev on 2026-07-06.
Worked examples
Watch the tier boundary: the 150K example is billed at $2/$12, but the 300K and 900K examples cross 200K and re-rate to $4/$18. Paste your own prompt above to price it exactly.
| Scenario | Input | Output | Cost |
|---|---|---|---|
Short chat turn A typical Q&A turn — well within the low tier. | 800 | 400 | <$0.01 |
150K input (low tier) A large prompt still under the 200K threshold: $2/$12. | 150,000 | 2,000 | $0.324 |
300K input (high tier) Crosses 200K — the whole request re-rates to $4/$18. | 300,000 | 3,000 | $1.25 |
Near-full context Deep in the upper tier, close to the 1M ceiling. | 900,000 | 4,000 | $3.67 |
The jump between the 150K and 300K rows is the tier surcharge made visible — the extra 150K of input more than doubles the input bill because the rate itself changes, not just the token count. For sustained large-context work, Gemini 3.1 Pro's upper tier is often where a flat-priced million-token model like GPT-4.1 wins on cost.
How is this counted?
Google doesn't publish a client-side Gemini tokenizer, so we approximate with o200k_base (via js-tiktoken), which empirically tracks Gemini within a few percent on English prose and source code. For exact, billable counts, Google's countTokens API endpoint returns the precise figure before you send a request. Inputs over 50,000 characters run in a Web Worker. Treat this as a budgeting estimate — typical drift is ~3%.
FAQ
Why does the price jump on large prompts?
How is Gemini 3.1 Pro different from Gemini 2.5 Pro?
How accurate is the token count?
What is the context window?
Does the tier surcharge apply to output too?
Compare against every other model
To see this exact prompt scored against every supported model, sorted by total cost, paste it into the home calculator and toggle Compare across all models. The comparison is most revealing on prompts above 200K tokens, where Gemini's tier surcharge separates it from flat-priced long-context models.
Related models
The natural comparison set: Gemini 2.5 Pro (the previous-generation Pro, cheaper at the same context length), Gemini 2.5 Flash (the budget Gemini tier), and GPT-4.1 (the flat-priced million-token alternative with no tier surcharge).