Phi-4
Compact Microsoft model trained on synthetic data for reasoning, math, and coding in English.
- Capability
- 129.2ECI · #144 of 166
- Input
- $0.125per 1M tokens
- Output
- $0.50per 1M tokens
- Context
- 16K16K max output
What it costs
- Input
- $0.125per million tokens
- Output
- $0.50per million tokens
- Blended (3:1)
- $0.219cheaper than 74% of priced models
Typical monthly bills
| Monthly usage | Estimated cost |
|---|---|
| Side project2M input + 0.5M output tokens | $0.50 |
| Team assistant25M input + 5M output tokens | $5.63 |
| Production app250M input + 50M output tokens | $56.25 |
Official Azure API price, as listed on models.dev.
Independent benchmarks
#144 of 166 scored models
The shaded band is Epoch AI’s confidence range (126.2–131.9); the tick marks the median scored model.
Scores from Epoch AI, run independently of Microsoft.
The details
- Lab
- Microsoft
- Task
- Text reasoning
- Published capabilities
- Microsoft’s compact dense model optimized for reasoning over text, including mathematical and scientific prompts.
- Model size
- 14B parameters
- Access
- Downloadable weights and a Microsoft Foundry listing.
- Operating limits
- Text input and text output. Its 16,384-token context is smaller than several later Phi variants.
- Released
- Dec 12, 2024
- Knowledge cutoff
- Jun 2024
- Context window
- 16,384 tokens
- Max output
- 16,384 tokens
- Inputs
- Text
- Output
- Text
- Reasoning
- No
- Tool calling
- No
- Structured output
- Unconfirmed
- File attachments
- No
- Temperature control
- Yes
- Weights
- Open weights · MIT
- API model ID
phi-4on Azure- Availability
- 5 API providerslisted on models.dev
More from Microsoft
About Phi-4
How much does Phi-4 cost?
Phi-4 costs $0.125 input / $0.50 output per million tokens (official Azure API price). At a 3:1 input-to-output mix that is $0.219 per million tokens, cheaper than 74% of the 495 priced models we track.
What is the context window of Phi-4?
Phi-4 accepts up to 16,384 tokens per request and can write up to 16,384 tokens in one response.
How good is Phi-4?
Epoch AI gives Phi-4 a Capabilities Index score of 129.2 (likely range 126.2–131.9), ranking it #144 of 166 models Epoch has scored. Epoch AI benchmark results: GPQA Diamond 56.1%, OTIS Mock AIME 2024–2025 13.8%.
Is Phi-4 open source?
Yes. Microsoft publishes the weights under the MIT licence, so it can be downloaded and self-hosted.
What inputs does Phi-4 support?
Phi-4 accepts text. Microsoft’s compact dense model optimized for reasoning over text, including mathematical and scientific prompts.
When was Phi-4 released?
Microsoft released Phi-4 on Dec 12, 2024. Its training data runs to Jun 2024.
What are the best alternatives to Phi-4?
The closest current models from other labs on capability, price and release date are Llama 4 Scout 17B Instruct (Meta, ECI 127.7, $0.17 / $0.59), Gemma 3 27B IT (Google, ECI 127.6, $0.10 / $0.299), GPT-4.1 nano (OpenAI, ECI 126.8, $0.10 / $0.40) and Qwen3 8B (Alibaba (Qwen), ECI 132.1, $0.195 / $0.47).