Microsoft: Phi 4 vs. Google: Gemma 4 31B
Interactive cost comparison based on live API token rates and context window limits. Overall lower blended token cost: Microsoft: Phi 4.
Interactive Side-by-Side Cost Calculator
Slide your daily token volume to compare monthly bills between both models in real time.
Microsoft: Phi 4 Monthly Cost
$0.00/mo
Google: Gemma 4 31B Monthly Cost
$0.00/mo
Side-by-Side Specs & Token Rates
| Metric | Microsoft: Phi 4 | Google: Gemma 4 31B |
|---|---|---|
| Provider | Microsoft | |
| Model Type | Open-Weight | Open-Weight |
| Input Cost / 1M | $0.07 | $0.20 |
| Output Cost / 1M | $0.14 | $0.40 |
| Context Window | 16,384 tokens | 262,144 tokens |
| 4-Bit Quantized VRAM | 9.1 GB (Open-Weight) | 20.2 GB (Open-Weight) |
Cloud Infrastructure Deal
Deploy Your AI App or Open-Source LLM for Less
Rent serverless or dedicated GPUs on RunPod and Vast.ai to cut your monthly AI infrastructure bill by up to 70%.