Claude Fable 5$22.000/MClaude Opus 4.8$11.000/MClaude Opus 4.7$11.000/MClaude Opus 4.6$11.000/MClaude Opus 4.5$33.000/MClaude Sonnet 3.7$6.600/MClaude Opus 3$33.000/MClaude 2.1$12.800/MClaude 2$12.800/MGPT-5.5$12.500/MGPT-5.2$5.425/MGPT-5.2-Codex$5.425/MGPT-5$3.875/MGPT-4.5$97.500/MGPT-4 Turbo Preview$16.000/MGPT-4$39.000/MGPT-4-32k$78.000/Mo3$19.000/Mo3-mini$2.090/Mo4-mini$2.090/Mo1$28.500/Mo1-mini$5.700/Mo1-preview$28.500/MGemini 3.5 Pro$5.000/MGemini 3.1 Pro$5.000/MGemini 3 Pro$5.000/MGemini 2.5 Pro$3.875/MGemini 1.5 Pro$2.375/MGemini 1.0 Ultra$12.000/MGemini 1.0 Pro$0.800/MClaude Fable 5$22.000/MClaude Opus 4.8$11.000/MClaude Opus 4.7$11.000/MClaude Opus 4.6$11.000/MClaude Opus 4.5$33.000/MClaude Sonnet 3.7$6.600/MClaude Opus 3$33.000/MClaude 2.1$12.800/MClaude 2$12.800/MGPT-5.5$12.500/MGPT-5.2$5.425/MGPT-5.2-Codex$5.425/MGPT-5$3.875/MGPT-4.5$97.500/MGPT-4 Turbo Preview$16.000/MGPT-4$39.000/MGPT-4-32k$78.000/Mo3$19.000/Mo3-mini$2.090/Mo4-mini$2.090/Mo1$28.500/Mo1-mini$5.700/Mo1-preview$28.500/MGemini 3.5 Pro$5.000/MGemini 3.1 Pro$5.000/MGemini 3 Pro$5.000/MGemini 2.5 Pro$3.875/MGemini 1.5 Pro$2.375/MGemini 1.0 Ultra$12.000/MGemini 1.0 Pro$0.800/M
BETA
Microsoft
Microsoft
Reasoning

Phi-4

Frontier SLM

Microsoft Research's 14B reasoning small model. Punches well above its weight on math and code, and runs on a single GPU.

Phi-4 is a reasoning AI model from Microsoft. It costs $0.070 per million input tokens and $0.280 per million output tokens (blended $0.133/M), with a 16K-token context window.

INPUT
$0.070/M
per million input tokens
OUTPUT
$0.280/M
per million output tokens
CONTEXT
16K
16,000 tokens
What it's good at
  • 14B fits one GPU
  • Strong math/code for size
  • Permissive license
Typical use cases
  • On-prem reasoning
  • Edge inference
  • Distillation studies
Benchmarks
vs. best public score
MMLU84%
Multitask academic knowledge across 57 subjects.
GPQA Diamond56%
Graduate-level science questions, "Google-proof".
MATH80%
High-school competition math problems.
HumanEval82%
Python function synthesis from docstrings.
Hand-curated from each provider's published reports and public leaderboards. Methodology varies across sources — treat as directional rather than authoritative.
More from Microsoft
See all 8
Frequently asked questions

How much does Phi-4 cost?

Phi-4 costs $0.070 per million input tokens and $0.280 per million output tokens, for a blended reference rate of $0.133 per million tokens.

What is Phi-4's context window?

Phi-4 supports up to 16K tokens of context (16,000 tokens).

What is Phi-4 best for?

Phi-4 is well suited to 14B fits one GPU, Strong math/code for size and Permissive license.

Who makes Phi-4?

Phi-4 is developed and served by Microsoft.