Phi-4 Pricing
FastMicrosoft · 16K tokens context
Phi-4 from Microsoft costs $0.065 per 1 million input tokens and $0.140 per 1 million output tokens as of June 2026 (live OpenRouter data). The model supports a 16,384-token context window (approximately 12,288 words) with a 4K-token maximum output. A typical 1,000-token request costs $0.0001 in input charges; a 10,000-token request costs $0.0006.
| Input price | $0.065 / 1M tokens |
|---|---|
| Output price | $0.140 / 1M tokens |
| Output / input ratio | 2.2× |
| Context window | 16,384 tokens (~12,288 words) |
| Maximum output | 4,096 tokens |
| Cost per 1K tokens (input) | $0.0001 |
| Tier | Fast |
| Last verified |
Phi-4 is Microsoft's small language model — a 14B parameter model that punches above its weight class on reasoning and math benchmarks. Designed for on-device and edge inference where quality-per-parameter matters.
Input Price
$0.065
per 1 million tokens
Output Price
$0.140
per 1 million tokens
Context Window
16K tokens
max 4K output
Cost Examples
| Request Type | Tokens | Input Cost | Output Cost |
|---|---|---|---|
| 1,000 word article | 1,333 | $0.0000866 | $0.000056 |
| 10-page document (2,500 words) | 3,333 | $0.000217 | $0.00014 |
| 1,000 lines of code | 5,000 | $0.000325 | $0.00021 |
| 100K token document | 100,000 | $0.0065 | $0.0042 |
Output cost estimated at 30% of input token count. Use the calculator for exact figures.
Strengths
- ✓Best reasoning quality at this parameter count
- ✓Very cheap — $0.07/1M input
- ✓Efficient: great for edge and on-device deployment
- ✓Strong on STEM tasks relative to size
Limitations
- –16K context limit — much smaller than competitors
- –Not for long-document tasks
Best Use Cases
Calculate Phi-4 Costs
Use the TokenRate calculator to convert any budget, token count, or text into exact Phi-4 costs — and compare across all models.
Open Calculator →Phi-4 — FAQ
Related Models
Related Guides