Microsoft

Phi-4 — Benchmark Scores, Pricing & Performance Analysis

OPEN SOURCEMicrosoft
Output Speed
93 tok/s
Input Cost
$0.07/1M
Output Cost
$0.14/1M
Context Window
16K
Max Output
4K
Knowledge Cutoff
Oct 2023
Accepts
text

Phi-4 by Microsoft demonstrates competitive pricing. View detailed benchmark data including scores across coding, math, reasoning, speed, and cost metrics.

Specifications last checked against the provider on . Benchmark scores carry their own source, linked beside each number.

Speed Benchmarks

Output Speed
93 tok/s36th of 94

Tokens generated per second

Aggregated
Time to First Token
300 ms24th of 92

Latency before first token arrives

Aggregated

Cost Benchmarks

Input Cost
$0.07101st of 413

Cost per 1M input tokens

OpenRouter API
Output Cost
$0.1497th of 413

Cost per 1M output tokens

OpenRouter API

Context Benchmarks

Context Length
16K396th of 451

Maximum context window size

OpenRouter API

Multimodal Benchmarks

MathVista
62.8%12th of 14

Visual mathematical reasoning across diagrams and charts

Papers

Available from 3 providers

The same model costs different amounts depending on who serves it. You can bring your own key for 2 of these — connect it here.

ProviderInput / 1MOutput / 1MCached inContextYour key
OpenRouter$0.07$0.14—16KSupported
Azure$0.125$0.5—128KSupported
Azure Cognitive Services$0.125$0.5—128K—

Phi-4 — Benchmark Scores Overview

Scores normalized to percentage scale for visual comparison. ELO scores mapped to 0-100 range (1100-1500).

Phi-4 — Frequently Asked Questions

How much does Phi-4 cost?

Phi-4 costs $0.07 per 1M input tokens and $0.14 per 1M output tokens. This makes it one of the more affordable models.

How fast is Phi-4?

Phi-4 generates output at 93 tokens per second, which is moderate compared to other models. The time to first token is 300 ms.

What is the context window of Phi-4?

Phi-4 has a context window of 16K tokens. This determines how much text, conversation history, and code the model can process in a single request.

Who created Phi-4?

Phi-4 was created by Microsoft. It is classified as a open source model in our catalogue.

Is Phi-4 open source?

Yes, Phi-4 is an open-source model. The model weights are publicly available for download and self-hosting.