# GPT-5.1-Codex vs Phi-4

> GPT-5.1-Codex is the stronger model overall, scoring 38.6 to 31.2 on the Noometry Index. Phi-4 costs 39× less per token, which makes it the better buy when GPT-5.1-Codex's lead doesn't matter for your workload.

- Canonical page: https://noometry.com/compare/gpt-5-1-codex-vs-phi-4
- Last updated: 2026-10-11
- Shared benchmarks: 0

## Summary

- The widest gap is in agentic & tool use, where GPT-5.1-Codex leads 38.0 to 22.8.
- Phi-4 is cheaper at $0.07 / $0.14 per million input/output tokens, against $1.25 / $10 for GPT-5.1-Codex.
- GPT-5.1-Codex accepts more context: 400K tokens versus 128K.
- Phi-4 has downloadable open weights; the other is API-only.

## Snapshot

| | GPT-5.1-Codex | Phi-4 |
|---|---|---|
| Provider | OpenAI | Microsoft |
| Noometry Index | 38.6 | 31.2 |
| Rank | 186 | 279 |
| Context | 400K | 128K |
| Input $/M | $1.25 | $0.07 |
| Output $/M | $10 | $0.14 |
| Weights | Proprietary | Open |

## Coding

- GPT-5.1-Codex: 41.9 (#116)
- Phi-4: 34.4 (#239)

| Benchmark | GPT-5.1-Codex | Phi-4 |
|---|---|---|
| SWE-bench Verified (bash only) | 66% | — |
| LMArena WebDev | 1337 | — |
| BigCodeBench Instruct | — | 45.5% |
| LiveBench Coding | — | 30.7% |
| LMArena Coding | — | 1231 |
| BigCodeBench Complete | — | 55.4% |
| ALE-Bench | 1,245 | — |

## Agentic & Tool Use

- GPT-5.1-Codex: 38.0 (#33)
- Phi-4: 22.8 (#128)

| Benchmark | GPT-5.1-Codex | Phi-4 |
|---|---|---|
| Terminal-Bench | 60.4% | — |
| Berkeley Function Calling Leaderboard | — | 28.8% |
| BALROG | — | 11.6% |
| METR Time Horizons | 70.8% | — |

## Reasoning

- GPT-5.1-Codex: —
- Phi-4: 17.7 (#291)

| Benchmark | GPT-5.1-Codex | Phi-4 |
|---|---|---|
| Chess Puzzles | — | 1% |
| LiveBench Reasoning | — | 47.8% |
| LMArena Hard Prompts | — | 1220 |
| LiveBench Data Analysis | — | 45.2% |
| Epoch Capabilities Index | — | 130.42 |
| LiveBench | — | 41.6% |

## Math

- GPT-5.1-Codex: 30.3 (#235)
- Phi-4: 20.8 (#285)

| Benchmark | GPT-5.1-Codex | Phi-4 |
|---|---|---|
| OTIS Mock AIME 2024-2025 | — | 13.8% |
| ProofBench | 9% | — |
| LiveBench Math | — | 42% |
| LMArena Math | — | 1246 |
| MATH Level 5 | — | 64.9% |

## Knowledge

- GPT-5.1-Codex: —
- Phi-4: 32.6 (#209)

| Benchmark | GPT-5.1-Codex | Phi-4 |
|---|---|---|
| GPQA Diamond | — | 56.1% |
| Confabulations | — | 29.4% |
| Vectara Hallucination Rate | — | 3.7% |
| LMArena Expert | — | 1203 |
| MMLU | — | 84.8% |

## Multilingual

- GPT-5.1-Codex: —
- Phi-4: 37.2 (#237)

| Benchmark | GPT-5.1-Codex | Phi-4 |
|---|---|---|
| LMArena Non-English | — | 1197 |
| LMArena Chinese | — | 1212 |
| LMArena French | — | 1224 |
| LMArena German | — | 1222 |
| LMArena Japanese | — | 1158 |
| LMArena Korean | — | 1151 |
| LMArena Russian | — | 1209 |
| LMArena Spanish | — | 1234 |

## Instruction Following

- GPT-5.1-Codex: —
- Phi-4: 60.4 (#251)

| Benchmark | GPT-5.1-Codex | Phi-4 |
|---|---|---|
| LiveBench Instruction Following | — | 58.4% |
| LMArena Instruction Following | — | 1201 |

## Long Context

- GPT-5.1-Codex: —
- Phi-4: 36.9 (#226)

| Benchmark | GPT-5.1-Codex | Phi-4 |
|---|---|---|
| LMArena Longer Query | — | 1217 |

## Writing & Preference

- GPT-5.1-Codex: —
- Phi-4: 40.5 (#244)

| Benchmark | GPT-5.1-Codex | Phi-4 |
|---|---|---|
| LMArena Text | — | 1217 |
| LMArena Creative Writing | — | 1182 |
| Short-Story Creative Writing | — | 62.6% |
| LMArena Multi-Turn | — | 1206 |
| LiveBench Language | — | 25.6% |

## FAQ

### Is GPT-5.1-Codex better than Phi-4?

GPT-5.1-Codex is the stronger model overall, scoring 38.6 to 31.2 on the Noometry Index. Phi-4 costs 39× less per token, which makes it the better buy when GPT-5.1-Codex's lead doesn't matter for your workload.

### Which is cheaper, GPT-5.1-Codex or Phi-4?

Phi-4 is cheaper. It lists at $0.07 per million input tokens and $0.14 per million output tokens; GPT-5.1-Codex lists at $1.25 and $10.

### Is GPT-5.1-Codex or Phi-4 better for coding?

GPT-5.1-Codex scores higher on coding benchmarks: 41.9 versus 34.4 in the Noometry coding category.

### Which has the bigger context window?

GPT-5.1-Codex does, with 400K tokens against 128K.

### How many benchmarks do GPT-5.1-Codex and Phi-4 share?

0 benchmarks have published results for both models. GPT-5.1-Codex has 6 scored results on Noometry and Phi-4 has 37.
