LLM API PRICING & BENCHMARK HUB

Google Gemini Gemma 4 31B: API Pricing, Benchmarks & Token Calculator

Free tool

Last updated:

Planning to build an AI agent or application with Google Gemini Gemma 4 31B in 2026? Understanding your AI infrastructure budget is critical. At $0.14 per 1M input tokens and $0.40 per 1M output tokens, this model offers GPQA reasoning scores suitable for Research, fine-tuning, and self-hosted inference. Our interactive tool below allows you to model your exact AI infrastructure, adjusting for prompt caching and batching to find the highest cost-efficiency for your production requirements.

  • Input Cost:$0.14 / 1M tokens
  • Output Cost:$0.40 / 1M tokens
  • Context Window:256,000 tokens
Compare Gemma 4 31B vs Llama 4 405B
Select Provider & Model

Provider (9/12 · hover to remove)

Model (3 available)

Volume

Typical API, Heavy RAG, and Max context stress set monthly requests and how hard each call uses the token sliders—stress caps per request and trims calls so totals stay readable. Clears a use-case template on the right. Moving requests clears this row; moving input/output clears the tier.

Use Case Templates

Sets input, output, requests, and template value weights for the ROI read—touch a token slider and weights fall back to 50% / 50%. With Deep Reasoning, output is ×1.4 before pricing. Clears a volume preset on the left.

Include Vision / Image Processing

Off — no image fees for models that support vision.

Turn On to include image fees.

OffOn

Use Cached Pricing

Applies cached input rates where this catalog lists them (OpenAI, Anthropic, Google, …). Models without a cached rate keep list pricing.

OffOn

Quick Markup (Demo)

Add markup for client pricing

OffOn

Deep Reasoning / Thinking Mode

Model hidden reasoning / extended thinking charged like output tokens when enabled.

OffOn

Batch Pricing

Enable for 50% off input & output

OffOn

Price Alert

Get notified when cost exceeds limit

OffOn
≈ $5.60/mo
8K
1K1.0M
≈ $4.00/mo
2K
100500K
≈ $9.60 total
5K
10100K

Cost analysis

Gemma 4 31B Price per 1M Tokens & Cost Analysis

Estimated totals from the sliders above — list vs effective $/1M, how the month splits across input/output/vision, and a flat cumulative curve. Vision is $0 when vision is off.

Your pricing snapshot

Estimated monthly

$9.60

≈ $115.20 over 12 months if spend stayed flat (no growth or price changes).

List (catalog)

$0.14 in

$0.40 out

per 1M tokens

This scenario

$0.14 in

$0.40 out

effective $/1M

Share of this month

Input tokens
$5.60
58.3% of month
Output tokens
$4.00
41.7% of month
Vision
$0.00
0.0% of month

Spend mix and list vs. optimized

Bars use your current request and token settings. The right chart contrasts published list pricing with your effective rates after cache, batch, and related toggles.

By category

Input, output, and vision for this workload.

List vs optimized (monthly)

Total monthly at list ratecard vs your scenario.

12-month cumulative (flat spend)

Month n = n × estimated monthly bill — no seasonality or usage growth.

Performance

Gemma 4 31B Performance Benchmarks & Capabilities

Catalog benchmarks (0–100) for logic, coding, instruction following, and math — useful for orientation in this tool, not a replacement for your own benchmarks.

HumanEval 76.8% maps to coding 78. MMLU 87.1% maps to logic 85. IFEval 93.7% maps to instruction 92. GSM8k 97.6% maps to math 95. Speed 8.52 t/s maps to 45. Native reasoning confirmed via 'reasoning_details'.

Composite

88/100

Axis breakdown

Catalog benchmark · 0–100 per row

General knowledge & logic (MMLU-style)

Broad reasoning proxy for comparing model families — not a literal MMLU leaderboard value.

85

Coding & agents (HumanEval-style)

Coding and tool-use suitability from provider tier and model-id hints, not a fresh code benchmark.

78

Instruction following

How tightly the model tends to follow complex instructions in our catalog benchmark.

92

Math & reasoning depth

Numeric and reasoning tilt; boosted for reasoning-first ids in the catalog where applicable.

95

Shape: seven-pillar radar

Same model as above, shown as a radar with a grey industry-average shadow. Axes are normalized in this view, not absolute benchmark percentiles.

Model DNA radar chart for selected models

Axes: Price · Logic · Coding · Context · Speed · Multimodal · Openness. Openness = rough “how open/hostable” hint from provider family, not a license statement.

Technical note — methodology and limitations

Catalog Benchmarks (0–100). Manually maintained model-level scores; verify on your own evals.

Performance

Gemma 4 31B Speed, Latency & Technical Specs

Context headroom uses your input slider; TPS is a catalog throughput index (0–100). Regional bars are illustrative only — measure TTFT and p95 on your own accounts.

Context and speed snapshot

Prompt vs catalog window

8,000 input tokens of 256,000 max. Confirm hard output caps in the vendor console.

3.1% of catalog window

Max context
256,000
Your input
8,000

TPS speed index

45 /100

99 TPS display estimate — not measured from your traffic.

Regional index (US, CA, AU)

US = 100 baseline. Values are a deterministic illustration from model id and provider tier, not ping or routing from your network.

United States

Baseline edge (illustrative)

Index100

Canada

Typical North America variance

Index93

Australia

Long-haul hint vs US edge

Index78

Architecture, deployment, and API surface

Architecture

Dense

MoE vs dense inferred from catalog / id.

Deployment

Open-weight lineage (may be self-hostable — verify license)

Tools and modalities

Tools / function calling (Strong)

Multimodal text + images (vision-capable in catalog)

JSON mode

Yes (typical API)

Audio (id hint)

No strong id hint

What these performance fields do not show

Nothing here is a live latency measurement, SLO, or inventory of your deployment. Use vendor dashboards and your own traces for TTFT, tokens per second under load, and regional routing.

Expert verdict

Should you pick Gemma 4 31B?

Est. API spend

$9.60

/ month at these sliders

Strongest scenario

Data Extract

Highest fit index right now

Evaluate if Gemma 4 31B meets your production requirements based on your token volume and active features above. What follows folds those same sliders into pricing and capability signals—value for spend, a concise ROI read, and four mapped scenarios—so you can stress-test this pick without re-entering inputs.

ROI snapshot

ROI Verdict: Gemma 4 31B — At your effective token prices this scenario reads as budget-friendly. On the same catalog benchmark 0–100 axes as the Model DNA chart, Gemma 4 31B is softest on coding (78/100), so we do not position it for frontier codegen — the clearer strength is instruction following (92/100). Stress-test against research, fine-tuning, and self-hosted inference if that mirrors your product.

Value for spend

60.5%efficiency

Higher usually means more catalog intelligence per dollar at your effective token prices — for comparisons inside this tool only.

Our one-line read

ROI Verdict: Gemma 4 31B — At your effective token prices this scenario reads as budget-friendly. On the same catalog benchmark 0–100 axes as the Model DNA chart, Gemma 4 31B is softest on coding (78/100), so we do not position it for frontier codegen — the clearer strength is instruction following (92/100). Stress-test against research, fine-tuning, and self-hosted inference if that mirrors your product.

Figures mirror the calculator above. Treat as orientation: confirm with your own benchmarks, regions, and contract discounts before you commit budget.

Where Gemma 4 31B fits best

Each card shows a fit score (0–100) for a typical workload shape. Scan the bars, then read the lane that sounds like your product.

91

fit

Chatbot Arena

Gemma 4 31B in chatbot arena matchups

Latency depends entirely on your hardware stack. For chatbot arenas, pricing on output tokens matters most when replies are long — Gemma 4 31B is usable across tiers if you cap completion length.

75

fit

Code Gen

Gemma 4 31B in coding & agent workflows

Gemma 4 31B handles coding workloads with a high coding index (78/100 on the same heuristic axis as the DNA radar) — Research, fine-tuning, and self-hosted inference

50

fit

Doc Summary

Gemma 4 31B on long documents & RAG

Context window 256,000 tokens frames how much Gemma 4 31B can hold per call — pair chunking with research, fine-tuning, and self-hosted inference.

Top match

98

fit

Data Extract

Gemma 4 31B on structured extraction

Heuristic math/logic blend suggests Gemma 4 31B for numeric-heavy extraction — always validate on your schema.

How fit scores and efficiency are calculated

Fit indices mix catalog intelligence with your effective prices; incompatible Vision or non-native Deep reasoning toggles zero or heavily discount lanes, matching the compare value engine. The efficiency ring blends the same template weights — orientation only, not a vendor benchmark.

Workload compatibility

Workload: Custom Configuration

Excellent Fit

92

Overall Intelligence Score

Alignment with this workload profile reads as strong. We still recommend validation on production-grade prompts, policies, and guardrails before full rollout.

Scaling & ROI optimization

Monthly spend mix — use the split to prioritize where you optimize first.

Input 58%Output 42%
Est. input / month
$5.60
Est. output / month
$4.00
Tip: Your workload is input-heavy. If you are sending repeated context, ensure you use Prompt Caching to reduce costs.
Strengths & limitations

Pros

  • Highly cost-effective — standard list input pricing below $0.50 per 1M tokens.
  • Exceptional context capacity — supports well over 100k tokens on a single request.
  • Favorable standard list pricing on both input and output — well suited to high-turnover conversational workloads.
  • Multimodal-ready — documented support for vision and image inputs.

Cons

  • No immediate red flags detected for this workload. Always verify specific compliance requirements with the provider.

Benchmark similar LLM APIs

Strong fit for Custom Configuration — see and compare peer models

For your current sliders and use case, Gemma 4 31B is a sensible choice. Still benchmark comparable LLM APIs on list pricing, output token rates, and context limits before you commit production traffic.

Open a dedicated calculator for any pick below, or run a side‑by‑side API cost comparison to validate token economics and inference cost for your scenario.

Need a shareable artifact?

Get a print-ready PDF of your results and a CSV spreadsheet. Tap the button, then enter your work email. We use it to build your files and start the download—and to email you a copy if the site owner enabled that.

Per-model LLM cost calculator by LeadsCalc

Detailed Analysis

PDF Breakdown

Receive a comprehensive native vector PDF report with unit economics, benchmarks, and illustrative charts from your current settings.

Instant Setup
No CC Required

By submitting, you agree to our Privacy Policy and Terms.

Agency Accelerator

Whitelabel Google Gemini Gemma 4 31B
Calculator

Embed this Google Gemini Gemma 4 31B cost surface on your own domain — whitelabel branding, lead capture, and the same sliders your prospects already trust on LeadsCalc.

1-Click CRM Sync
Custom Branding
Branded Reports
Lead Analytics

FREE TO START

$0/mo*

NO CREDIT CARD REQUIRED

Optimization playbook

Deep dive: Scaling Google Gemini Gemma 4 31Bin production — cost, context, and deployment levers

This part is here to help you use Google Gemini Gemma 4 31B on Google Gemini without surprises. We use the same simple numbers you see in the calculator above. We are not your lawyer or your security team — grown-ups on your side still need to check contracts and privacy rules.

  • Tokens are tiny chunks of text. More tokens in each ask means a higher bill, like a longer taxi ride.
  • Input is what you send in. Output is what the model sends back. Long chat replies cost more because output grows.
  • Context is how big one message can be before the model says "that is too much at once." For Google Gemini Gemma 4 31B, our sheet lists about 256,000 tokens max.

What is a token? (simple version)

A token is a small piece of text the computer counts. It is not always one word — short words can share a token, long words can use more than one. That is OK. What matters is: more tokens → more money, just like more minutes on a phone plan.

When you move the input and output sliders on this page, you are really saying "my question is this long" and "I want an answer about this long." The bill grows when either side grows.

What Google Gemini Gemma 4 31B costs on the list (today)

For Google Gemini Gemma 4 31B, our list says about $0.14 for every 1 million input tokens and about $0.40 for every 1 million answer tokens.

Those prices are list prices from our catalog. Your real bill can go up or down when you turn on batch mode, caching, vision, or special "think longer" modes — use the toggles above to see that story for your own app.

Why "where you call" still matters

Picture the AI living in a data center. If your users are in Australia but you always call a far-away region, answers can feel slower and routing can get fussier. Picking a closer home base is like picking a playground near your house instead of across town.

Teams in Australia often test Sydney (ap-southeast-2) or Singapore. Teams in the US often pick us-east-1 or us-west-2. Canada often maps to the same US zones or a Canada-only route if Google Gemini offers one.

After you pick a region in the real Google Gemini console, come back here and plug in the traffic you expect. Then the money line matches what your users will feel in production.

Gemma 4 31B

Google Gemini

Input
$0.14per 1M tokens
Output
$0.4per 1M tokens
Context
256kmax tokens

The three boxes above are your quick cheat sheet for Google Gemini Gemma 4 31B: Input is what you pay to send stuff in, Output is what you pay to get answers back, and Context is how big one combined message can be (256,000 tokens in our catalog).

Performance snapshot (hints, not benchmarks)

Think of this as a report card for Google Gemini Gemma 4 31B inside LeadsCalc — not a race you won in real life. The numbers come from our catalog, not from timing your app today.

Speed score 45/100 means we guess it feels more patient for most apps (moderate / variable). Smarts score 88/100 blends logic, coding, listening, and math hints into one line so you can compare models without a PhD.

One more plain note: Latency depends entirely on your hardware stack. In kid words: the table is a guess from our catalog, like a weather forecast — your real app might feel a little different.

Google Gemini Gemma 4 31B
Speed hinthow snappy it may feel45/100
Speed bucketwe group models like thisModerate / variable
Overall smartsone blended score from our catalog88/100
Logic & tricky puzzleshard questions, not just small talk85/100
Coding hintgood for code or not78/100
Following instructionsdoes it listen well92/100
Math-style thinkingnumbers and logic95/100
Room for one big askStrong for long reports, transcripts, and mid-size repos.~256K tokens

Catalog Benchmarks (0–100). Manually maintained model-level scores; verify on your own evals.

Scaling levers

Prompt caching on Google Gemini Gemma 4 31B (when your vendor offers it)

Our price list for this model does not show a special cached rate yet. That does not mean caching never exists — it just means you should read Google Gemini's own page, then type the discount you really get into your own spreadsheet.

Catalog hint: Not listed in catalog — assume full input rate

Shorter system prompts = smaller bills

The system prompt is the quiet voice that tells the model how to behave. Every word there is counted on every chat turn — like paying a cover charge at the door again and again.

Keep the rules short and sweet. Put long examples in a file your app reads once, or pull facts with search ( RAG ) instead of pasting huge walls of text. Then slide the input knob above and watch the month total shrink for Google Gemini Gemma 4 31B.

Feature hint: Depends on provider — use catalog cached rate when shown

Tools, JSON answers, and other API tricks

Some apps need the model to call tools (like a calculator or a database) or return neat JSON for your code to parse. Think of tools like extra hands the model can borrow — super useful, but each call can add more steps and more tokens.

  • Tools / functions: Strong — standard tool/function patterns on hosted API
  • JSON-style answers: Yes — JSON / schema-style outputs widely used
  • Fine-tuning: Provider-dependent — confirm current program

Big documents and RAG with Google Gemini Gemma 4 31B

Google Gemini Gemma 4 31B can hold a long story in one go — up to about 256,000 tokens in our catalog. That is like a very big book, but you still pay more when you stuff more text in each ask.

RAG is a fancy way to say "search my files first, then ask the model with only the best bits." That is cheaper than dumping a whole library into one prompt, and it often answers better too.

Our catalog caps one combined message around 256K tokens for this model — still huge, but not infinite. Split giant PDFs into chunks, only paste the top matches, and cap how long each chunk can be.

Files & docs hint: Vision path for images; long PDFs often via text extraction + RAG

Pictures, PDFs, and other "see it" inputs

When you send a picture, the bill is usually different from plain text — like adding a snack on top of your meal. Turn on vision in the calculator above when your workload uses images so the total feels real.

  • Vision: Yes — ~$0.005/image (catalog) (Yes — ~$0.005/image (catalog))
  • Audio: Not highlighted in this catalog — assume text unless your provider enables audio
  • Long files: Vision path for images; long PDFs often via text extraction + RAG

Batch mode: wait a bit, pay less

Batch is like mailing letters in one big bag at the end of the day instead of hand-delivering each one. The answer might arrive later, but the stamp can cost a lot less — many vendors advertise roughly half off list for batch-style tiers when they apply.

If your job is not urgent overnight reports, exports, or backfills try the batch toggle in the calculator and compare the monthly line for Google Gemini Gemma 4 31B.

  • What we heard: Typically yes — batch tiers often ~50% off list (toggle in calculator)
  • Price note: Use calculator batch toggle — often ~50% off list when supported

When the model "thinks longer" (reasoning)

Some models can do extra thinking steps before they speak. That can help with hard puzzles, but it is like leaving the lights on longer — you often pay for more work behind the scenes.

In your product, default people to the normal mode and only offer the heavy-thinking switch when it really matters (math contests, tricky planning, rare audits). Ask your team to read Google Gemini's billing page so you know which tokens count as output, thinking, or something else.

Speed story: Moderate / variableLatency depends entirely on your hardware stack.

Chatbots and Google Gemini Gemma 4 31B

Chat apps love long friendly replies. Long replies mean more output tokens, and output tokens are money walking out the door.

Google Gemini Gemma 4 31B can work well for assistants if you set a max answer length, cache the boring repeated rules, and trim empty chit-chat.

Our one-line vibe check: Research, fine-tuning, and self-hosted inference

Watch-out: Teams with zero ML ops capacity

Copying facts out of big tables (extraction jobs)

Extraction means "read this messy pile, give me clean rows." You want short answers (like tight JSON) so you do not pay for a poem nobody asked for.

Put repeating examples in a cached block when you can, split monster spreadsheets into smaller jobs, and use batch pricing when the work can wait. Slide the output tokens down in the calculator to see how sensitive your bill is.

JSON hint: Yes — JSON / schema-style outputs widely used

Coding helpers and Google Gemini Gemma 4 31B

Google Gemini Gemma 4 31B can still help with code, but our hints say another family might be the specialist for raw coding speed. Use this model where its strengths shine, and switch when the task is mostly boilerplate generation.

Catalog coding score: 78/100 (same 0–100 toy scale as the table above — not a promise about your private repo).

Open-weights path with Google Gemma licensing options

Safety, privacy, and your customers' secrets

This website is a calculator — we are not your security team. Google Gemini decides what they log, how long they keep it, and which countries hold the data. If you handle health or school records, grown-ups need signed papers (things like BAAs / DPAs) — not just vibes.

Before any secret leaves your building, ask: "Would I be OK if this text was on a billboard?" If not, strip names, addresses, and passwords before you call Google Gemini Gemma 4 31B.

Vendor note: Training / retention / regions are vendor-specific — confirm in enterprise agreements.

How Google Gemini Gemma 4 31B is usually run (cloud vs. your own computers)

Some teams run Google Gemini Gemma 4 31B-style weights on their own machines. That can change the math: fewer token bills, more electricity and nerds on call at 3 a.m. Compare that to letting Google Gemini host everything for you.

Story from our catalog: Google — Gemini on AI Studio / Vertex for cloud-native teams Open-weight (often self-hostable)

Will the price go up or down later?

Model prices bounce around like airplane tickets when airlines compete. New "mini" or "flash" models often push older prices down — good for buyers, noisy for budgets.

Save a PDF from this page when finance asks for proof, and peek at Google Gemini's release notes when you renew a contract. The sliders above stay the fastest way to ask "what if traffic doubles?"

Live hint: Adjust sliders above for your tokens, requests, vision, cache, and batch — totals update live.

Put this Google Gemini Gemma 4 31B calculator on your own website

If you run an agency, you can embed the same sliders your visitors used here — with your colors, your logo, and a form that sends leads to your email or CRM. You skip rebuilding giant price tables by hand.

Compare Gemma 4 31B with Other AI Models

Jump straight into a head-to-head pricing view with Gemma 4 31B first in the comparison slug, matching how the rest of LeadsCalc orders model battles.

Frequently Asked Questions about Gemma 4 31B

Short answers grounded in the catalog fields used by this calculator. Adjust assumptions in the tool above for your real traffic mix.

How does Gemma 4 31B performance compare to other models?

Based on our catalog benchmarks, Gemma 4 31B is evaluated across coding, logic, math, and instruction following. Use the performance radar chart above to see its exact strengths, or visit our comparison hub to see head-to-head win rates against models like GPT-4o and Claude 3.5 Sonnet.

What does Gemma 4 31B cost per million input and output tokens?

For Google Gemini Gemma 4 31B, this calculator uses $0.14 per 1M input tokens and $0.40 per 1M output tokens as baseline API pricing. Rates can vary by region, commitment tier, and batch endpoints—use the calculator above to stress-test your workload.

What context window does Gemma 4 31B support?

Gemma 4 31B is listed with a 256,000-token context window for a single request in our catalog. Very long prompts still increase cost linearly with tokens, so pair window size with caching and retrieval when possible.

Does Gemma 4 31B support vision or multimodal inputs?

Gemma 4 31B supports image inputs in this catalog; vision is priced separately from text tokens (see your provider for how images map to tokens).

How can I compare Gemma 4 31B with GPT-4o, Claude 3.5 Sonnet, or DeepSeek V3?

Use the comparison links in the section above for side-by-side pricing and context, or open the full comparison hub at https://www.leadscalc.com/calculators/ai/compare to explore more model pairs.

Who hosts the Gemma 4 31B API?

Gemma 4 31B is offered under Google Gemini in this catalog. Wire your keys and endpoints per their docs; this page focuses on token economics, not account setup.