TokenRate

Phi-4 Pricing

Fast

Microsoft · 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.

Phi-4 pricing and capability summary
Input price$0.065 / 1M tokens
Output price$0.140 / 1M tokens
Output / input ratio2.2×
Context window16,384 tokens (~12,288 words)
Maximum output4,096 tokens
Cost per 1K tokens (input)$0.0001
TierFast
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.

Live pricing from OpenRouter

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 TypeTokensInput CostOutput Cost
1,000 word article1,333$0.0000866$0.000056
10-page document (2,500 words)3,333$0.000217$0.00014
1,000 lines of code5,000$0.000325$0.00021
100K token document100,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

Edge and on-device reasoning
STEM tutoring apps
Budget math/coding assistance

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