Gemini · Fast / Budget · 1,000K context window

Gemini 3 Flash pricing for code refactoring

$0.0140 per call at 4,000 input / 4,000 output tokens.

Per call

$0.0140

10K calls/mo

$140

Cache savings

75% off input

Batch savings

50% off all

Calculate your Gemini 3 Flash costs

Adjust token counts, volume, and discount toggles to model your code refactoring spend. Pricing updated weekly.

Configure your usage

4,000
100100K
4,000
5050K
10,000
1001M

Estimated cost

Monthly cost
$140
10,000 calls/month
Cost per call$0.014
Daily cost$5
Input rate$0.50/MTok
Output rate$3.00/MTok
Analyze your real spend

Quick start

Call Gemini 3 Flash with the Google Generative AI SDK:

import google.generativeai as genai

model = genai.GenerativeModel("gemini-3-flash")
response = model.generate_content("Your prompt here")
# Cost: ~$0.0140 per call at standard rates
# Input:  $0.50/MTok
# Output: $3.00/MTok

How Gemini 3 Flash compares on cost

Per-call cost for all models scoring 50+ on code refactoring benchmarks. Hover for details.

Cheapest viable option: Claude Sonnet 5 at $0.0480/call (-243% less, 93/100 quality).

Complete Gemini 3 Flash pricing breakdown

Standard token rates

Direction$/MTokTokens per call
Input$0.504,000
Output$3.004,000

Prompt caching: 75% off input tokens

Caching drops input cost from $0.50 to $0.13/MTok. For repeated system prompts, that saves $0.001500 per call.

Batch API: 50% off all tokens

Submit requests asynchronously and receive 50% off all token costs. This works best for offline pipelines where latency requirements are flexible.

Monthly cost projections

Monthly volumeCost per callStandard monthlyCached monthlyYou save with caching
10,000 calls$0.0140$140$125$15
50,000 calls$0.0140$700$625$75
100,000 calls$0.0140$1,400$1,250$150
500,000 calls$0.0140$7,000$6,250$750
1,000,000 calls$0.0140$14,000$12,500$1,500

Gemini 3 Flash quality benchmarks for code refactoring

Consider alternatives for code refactoring

Scores 65/100 (rank #7 of 14). Better options exist at similar price points for code refactoring.

Top-ranked: Claude Fable 5 (96/100) at $0.2400/call

Performance across all task types

Gemini 3 Flash scores by task type. Code Refactoring highlighted.

Classification88Extraction86Summarization83Q&A82Code Generation *65Code Review62Reasoning58Creative Writing52
Task typeConfidence scoreRank out of 14
Classification88/100#3
Extraction86/100#3
Summarization83/100#5
Q&A82/100#5
Code Generation(current page)65/100#7
Code Review62/100#7
Reasoning58/100#7
Creative Writing52/100#8

Alternative models for code refactoring

9 models score 80+ on code refactoring benchmarks, sorted by input rate. Cheapest: Claude Sonnet 5 (-243% less, 93/100 quality).

ModelProviderInput $/MTokOutput $/MTokQualityPer callvs Gemini
Claude Sonnet 5Claude$2.00$10.0093/100$0.0480243% more
Gemini 3.1 ProGemini$2.00$12.0086/100$0.0560300% more
GPT 5.4GPT$2.50$15.0084/100$0.0700400% more
GPT 5.6 TerraGPT$2.50$15.0086/100$0.0700400% more
Claude Sonnet 4.6Claude$3.00$15.0092/100$0.0720414% more
Claude Opus 4.8Claude$5.00$25.0095/100$0.1200757% more
GPT 5.5GPT$5.00$30.0091/100$0.1400900% more
GPT 5.6 SolGPT$5.00$30.0094/100$0.1400900% more
Claude Fable 5Claude$10.00$50.0096/100$0.24001614% more

About Gemini 3 Flash

Provider

Gemini

Tier

Fast / Budget

Context

1,000K tokens

Released

Mar 2026

Other models from Gemini

ModelTierInput $/MTokOutput $/MTokContext
Gemini 3.1 ProMid-tier$2.00$12.001,000K
Gemini 3.5 FlashFast / Budget$1.50$9.001,000K
Gemini 3.5 Flash-LiteFast / Budget$0.25$1.501,000K

You can compare Gemini 3 Flash head-to-head against any other model on our model comparison pages, or track how pricing has changed over time on the pricing history tracker.

Frequently asked questions

How much does Gemini 3 Flash cost for code refactoring per API call?

$0.0140 per call at 4,000 input / 4,000 output tokens.

Is Gemini 3 Flash the best model for code refactoring?

Scores 65/100, rank #7 of 14 models. Top-ranked: Claude Fable 5 at 96/100.

What is the cheapest model for code refactoring with good quality?

Claude Sonnet 5 scores 93/100 quality at $2.00/$10.00 per MTok. That is -243% less than Gemini 3 Flash per call.

How can I reduce my Gemini 3 Flash costs for code refactoring?

Three strategies: prompt caching (75% off input), batch API (50% off all tokens), prompt optimization. Combined: $0.0140 drops to about $0.001750 per call.

How does Gemini 3 Flash pricing compare to other Gemini models?

Gemini also offers: Gemini 3.1 Pro at $2.00/$12.00, Gemini 3.5 Flash at $1.50/$9.00, Gemini 3.5 Flash-Lite at $0.25/$1.50.

What context window does Gemini 3 Flash support?

1,000K tokens total. Typical code refactoring calls use 4,000 plus 4,000 tokens, well within limits.

Track what you spend on AI

This calculator estimates costs based on published rates only. Connect your API usage to see where your money goes and which models drive your spend.