Phi 4 vs Qwen3.8 27B
Updated October 21, 2026. 32 benchmarks have a result for both. Coding is ranked on the Vibe Coding Index; every other board is shown as published.
Decision reading
Only Qwen3.8 27B has a coding score, 74.2 on the Vibe Coding Index; Phi 4 has none, so the two cannot be ranked on coding.
Phi 4 has the edge where output tokens cost 18.2x less.
- Shared results
- 32
- Phi 4 only
- 13
- Qwen3.8 27B only
- 53
- Like-for-like categories
- 6 of 9
Shared results can support a head-to-head reading. Results only one model has describe coverage, not superiority.
Which one for your work
Each card is decided by one number both models carry. Where only one has it, the card says so and makes no call.
Coding
Vibe Coding Index, six public coding benchmarks
No call
Only Qwen3.8 27B has a coding score, so no call is made.
One side not measured
Intelligence
AA Intelligence Index
Qwen3.8 27B
Qwen3.8 27B leads, 33.7 against 5.9.
Same board, both measured
Agentic work
AA Agentic Index
No call
Only Qwen3.8 27B has a AA Agentic Index result, 45.8.
Directional only
Reasoning
GPQA Diamond
No call
Only Qwen3.8 27B has a GPQA Diamond result, 88.9%.
Directional only
Knowledge
MMLU Pro
No call
Only Qwen3.8 27B has a MMLU Pro result, 84.3%.
Directional only
Long documents
Listed context window
Qwen3.8 27B
Qwen3.8 27B takes 1M tokens against 16K.
Listed by OpenRouter
Everyday cost
1K input + 500 output tokens
Phi 4
Phi 4 $0.0001, Qwen3.8 27B $0.0017 per turn.
List prices
Cost per solved task
One SWE-bench Verified task, solved
No call
Only Qwen3.8 27B has the number, $1.26.
Directional only
At a glance
- Coding index
- Phi 4 not benchmarked, Qwen3.8 27B 74.2 from 4 benchmarks.
- Widest category
- Coding, 41.9 points apart on average over 2 shared benchmarks.
- Widest single gap
- Long context reasoning (AA-LCR): Phi 4 0.0% against Qwen3.8 27B 82.0%, 82.0 points apart on a 0 to 100 scale.
- Output price
- Phi 4 $0.14 against Qwen3.8 27B $2.55 per million output tokens, 18.2x apart.
- Context window
- Phi 4 takes 16K tokens, Qwen3.8 27B 1M.
Benchmark by benchmark
First the score: boards each model leads, per category, where both have a result. Then every board, a category to a fold; bars are each result on a 0 to 100 scale, so compare the two in a row, not one row with another.
| Category | Phi 4 | Bars | Qwen3.8 27B | Ties |
|---|---|---|---|---|
| Coding | 0 | 2 | ||
| Intelligence | 0 | 2 | ||
| Reasoning | 0 | 5 | ||
| Math | 0 | 2 | ||
| Knowledge | 0 | 4 | ||
| General | 0 | 17 | ||
| All shared boards | 0 | 32 |
CodingLike-for-likeSix of these boards feed the Vibe Coding Index02
| Benchmark | Phi 4 | Qwen3.8 27B | Leader |
|---|---|---|---|
| LiveBench coding | Not measured | 86.8% | Only Qwen3.8 27B measured |
| LMArena WebDev | Not measured | 1593 | Only Qwen3.8 27B measured |
| AA Coding Index | Not measured | 68.1 | Only Qwen3.8 27B measured |
| LiveCodeBench (Vals AI) | Not measured | 84.0% | Only Qwen3.8 27B measured |
| SWE-bench Verified (Vals AI) | Not measured | 86.0% | Only Qwen3.8 27B measured |
| Vibe Code Bench (Vals AI) | Not measured | 64.8% | Only Qwen3.8 27B measured |
| Code migration (Vals AI) | Not measured | 14.2% | Only Qwen3.8 27B measured |
| ProgramBench (Vals AI) | Not measured | 0.0% | Only Qwen3.8 27B measured |
| IOI (Vals AI) | Not measured | 39.1% | Only Qwen3.8 27B measured |
| Terminal-Bench 2.1 (Vals AI) | Not measured | 58.4% | Only Qwen3.8 27B measured |
| SkillsBench (Vals AI) | Not measured | 38.1% | Only Qwen3.8 27B measured |
| CyberBench (Vals AI) | Not measured | 67.8% | Only Qwen3.8 27B measured |
| LiveCodeBench (Artificial Analysis run) | 23.1% | Not measured | Only Phi 4 measured |
| SciCode | Not measured | 46.6% | Only Qwen3.8 27B measured |
| Terminal-Bench Hard (Artificial Analysis run) | 3.8% | Not measured | Only Phi 4 measured |
| LMArena Text: coding | 1231 | 1483 | Qwen3.8 27B |
| LMArena Text: software and IT | 1228 | 1478 | Qwen3.8 27B |
| LMArena WebDev: React | Not measured | 1602 | Only Qwen3.8 27B measured |
| LMArena WebDev: HTML | Not measured | 1570 | Only Qwen3.8 27B measured |
| LMArena WebDev: from an image | Not measured | 1577 | Only Qwen3.8 27B measured |
| Neither model has a result on the other 18 boards here | |||
IntelligenceLike-for-likePublic boards, shown as published, kept out of the index02
| Benchmark | Phi 4 | Qwen3.8 27B | Leader |
|---|---|---|---|
| AA Intelligence Index | 5.9 | 33.7 | Qwen3.8 27B |
| Epoch Capabilities Index | 130.5 | 151.7 | Qwen3.8 27B |
Agentic workDirectional onlyPublic boards, shown as published, kept out of the index12 boards, none shared
| Benchmark | Phi 4 | Qwen3.8 27B | Leader |
|---|---|---|---|
| AA Agentic Index | Not measured | 45.8 | Only Qwen3.8 27B measured |
| LiveBench research | Not measured | 59.4% | Only Qwen3.8 27B measured |
| LiveBench browser | Not measured | 32.0% | Only Qwen3.8 27B measured |
| LiveBench long agentic | Not measured | 27.9% | Only Qwen3.8 27B measured |
| Finance Agent (Vals AI) | Not measured | 48.5% | Only Qwen3.8 27B measured |
| Tax Agent Bench (Vals AI) | Not measured | 30.9% | Only Qwen3.8 27B measured |
| Legal Research Bench (Vals AI) | Not measured | 36.1% | Only Qwen3.8 27B measured |
| Excel Modeling Benchmark (Vals AI) | Not measured | 59.7% | Only Qwen3.8 27B measured |
| Terminal-Bench-Science (Vals AI) | Not measured | 0.0% | Only Qwen3.8 27B measured |
| τ²-Bench Telecom | 0.0% | Not measured | Only Phi 4 measured |
| APEX-Agents | Not measured | 47.5% | Only Qwen3.8 27B measured |
| BALROG | 11.6% | Not measured | Only Phi 4 measured |
| Neither model has a result on the other 27 boards here | |||
ReasoningLike-for-likePublic boards, shown as published, kept out of the index05
| Benchmark | Phi 4 | Qwen3.8 27B | Leader |
|---|---|---|---|
| GPQA Diamond | Not measured | 88.9% | Only Qwen3.8 27B measured |
| LiveBench reasoning | Not measured | 80.0% | Only Qwen3.8 27B measured |
| MMMU Pro (Vals AI) | Not measured | 83.9% | Only Qwen3.8 27B measured |
| GPQA Diamond (Artificial Analysis run) | 57.5% | 90.5% | Qwen3.8 27B |
| Humanity's Last Exam (Artificial Analysis run) | 3.8% | 33.9% | Qwen3.8 27B |
| GPQA Diamond (Epoch AI run) | 56.1% | Not measured | Only Phi 4 measured |
| ARC-AGI | Not measured | 87.5% | Only Qwen3.8 27B measured |
| ARC-AGI-2 | Not measured | 42.4% | Only Qwen3.8 27B measured |
| LMArena Text: hard prompts | 1220 | 1459 | Qwen3.8 27B |
| LMArena Text: expert | 1203 | 1479 | Qwen3.8 27B |
| LMArena Text: hard prompts in English | 1230 | 1461 | Qwen3.8 27B |
| LMArena Vision: diagrams | Not measured | 1285 | Only Qwen3.8 27B measured |
| LMArena Vision: homework | Not measured | 1295 | Only Qwen3.8 27B measured |
| Neither model has a result on the other 8 boards here | |||
MathLike-for-likePublic boards, shown as published, kept out of the index02
| Benchmark | Phi 4 | Qwen3.8 27B | Leader |
|---|---|---|---|
| AA Math Index | 18.0 | Not measured | Only Phi 4 measured |
| AIME 2025 (Artificial Analysis run) | 18.0% | Not measured | Only Phi 4 measured |
| OTIS Mock AIME | 13.8% | Not measured | Only Phi 4 measured |
| ProofBench | Not measured | 16.0% | Only Qwen3.8 27B measured |
| MATH level 5 | 64.9% | Not measured | Only Phi 4 measured |
| LMArena Text: math | 1246 | 1455 | Qwen3.8 27B |
| LMArena Text: mathematical work | 1254 | 1458 | Qwen3.8 27B |
| Neither model has a result on the other 6 boards here | |||
KnowledgeLike-for-likePublic boards, shown as published, kept out of the index04
| Benchmark | Phi 4 | Qwen3.8 27B | Leader |
|---|---|---|---|
| MMLU Pro | Not measured | 84.3% | Only Qwen3.8 27B measured |
| LegalBench (Vals AI) | Not measured | 82.4% | Only Qwen3.8 27B measured |
| TaxEval (Vals AI) | Not measured | 70.8% | Only Qwen3.8 27B measured |
| MortgageTax (Vals AI) | Not measured | 64.9% | Only Qwen3.8 27B measured |
| MedCode (Vals AI) | Not measured | 28.7% | Only Qwen3.8 27B measured |
| MMLU Pro (Artificial Analysis run) | 71.4% | Not measured | Only Phi 4 measured |
| MMLU | 84.8% | Not measured | Only Phi 4 measured |
| LMArena Text: science | 1206 | 1467 | Qwen3.8 27B |
| LMArena Text: medicine and healthcare | 1202 | 1437 | Qwen3.8 27B |
| LMArena Text: legal and government | 1241 | 1447 | Qwen3.8 27B |
| LMArena Text: business and finance | 1199 | 1438 | Qwen3.8 27B |
| Neither model has a result on the other 6 boards here | |||
Web designDirectional onlyPublic boards, shown as published, kept out of the index1 board, none shared
| Benchmark | Phi 4 | Qwen3.8 27B | Leader |
|---|---|---|---|
| LiveBench design | Not measured | 75.9% | Only Qwen3.8 27B measured |
| Neither model has a result on the other 8 boards here | |||
GeneralLike-for-likePublic boards, shown as published, kept out of the index017
| Benchmark | Phi 4 | Qwen3.8 27B | Leader |
|---|---|---|---|
| LiveBench data analysis | Not measured | 76.6% | Only Qwen3.8 27B measured |
| SAGE (Vals AI) | Not measured | 52.4% | Only Qwen3.8 27B measured |
| MedScribe (Vals AI) | Not measured | 83.8% | Only Qwen3.8 27B measured |
| IFBench | 23.5% | Not measured | Only Phi 4 measured |
| Long context reasoning (AA-LCR) | 0.0% | 82.0% | Qwen3.8 27B |
| DTBench | Not measured | 88.0% | Only Qwen3.8 27B measured |
| LMCA | Not measured | 41.4% | Only Qwen3.8 27B measured |
| Creative writing (Lech Mazur) | 62.6% | Not measured | Only Phi 4 measured |
| Surface Evolver Bench | Not measured | 45.0% | Only Qwen3.8 27B measured |
| LMArena Text | 1217 | 1440 | Qwen3.8 27B |
| LMArena Text: instruction following | 1201 | 1436 | Qwen3.8 27B |
| LMArena Text: creative writing | 1181 | 1383 | Qwen3.8 27B |
| LMArena Vision | Not measured | 1269 | Only Qwen3.8 27B measured |
| LMArena Text: English | 1231 | 1448 | Qwen3.8 27B |
| LMArena Text: non-English | 1197 | 1428 | Qwen3.8 27B |
| LMArena Text: Chinese | 1212 | 1501 | Qwen3.8 27B |
| LMArena Text: German | 1222 | 1443 | Qwen3.8 27B |
| LMArena Text: Japanese | 1158 | 1387 | Qwen3.8 27B |
| LMArena Text: Korean | 1151 | 1384 | Qwen3.8 27B |
| LMArena Text: French | 1224 | 1465 | Qwen3.8 27B |
| LMArena Text: Spanish | 1234 | 1449 | Qwen3.8 27B |
| LMArena Text: Russian | 1209 | 1415 | Qwen3.8 27B |
| LMArena Text: Polish | Not measured | 1439 | Only Qwen3.8 27B measured |
| LMArena Text: multi-turn | 1206 | 1440 | Qwen3.8 27B |
| LMArena Text: longer queries | 1217 | 1448 | Qwen3.8 27B |
| LMArena Text: writing and language | 1198 | 1405 | Qwen3.8 27B |
| LMArena Text: entertainment and media | 1162 | 1393 | Qwen3.8 27B |
| LMArena Vision: English | Not measured | 1267 | Only Qwen3.8 27B measured |
| LMArena Vision: Chinese | Not measured | 1326 | Only Qwen3.8 27B measured |
| LMArena Vision: reading text | Not measured | 1281 | Only Qwen3.8 27B measured |
| LMArena Vision: humor | Not measured | 1235 | Only Qwen3.8 27B measured |
| LMArena Vision: creative writing | Not measured | 1237 | Only Qwen3.8 27B measured |
| Neither model has a result on the other 14 boards here | |||
Image generationNot comparablePublic boards, shown as published, kept out of the index0 boards, none shared
| Benchmark | Phi 4 | Qwen3.8 27B | Leader |
|---|---|---|---|
| Neither model has a result on 5 boards here | |||
What each workload costs
Three fixed token mixes at each model's listed price, so per-token rates become a bill.
Chat turn
1K input + 500 output tokens
Phi 4 costs less
Repository review
50K input + 3K output tokens
Phi 4 costs less
Agent loop
200K input + 10K output tokens
Phi 4 costs less
Listed OpenRouter rates, without cache or batch discounts. A workload that does not fit a model's context window would need splitting.
Specification differences
The leading value in a row is marked; a row with a missing value names no leader. Our two rows are marked in red.
| Specification | Microsoft Phi 4 | Qwen3.8 27B |
|---|---|---|
| Maker | Microsoft | Qwen |
| Weights | Open weights | Open weights |
| Released | January 10, 2025 | August 14, 2026 |
| Context window | 16K | 1M |
| Input $/Mtok | $0.07 | $0.425 |
| Output $/Mtok | $0.14 | $2.55 |
| Coding index | Not benchmarked | 74.2 |
| Independent measurements behind it | 0 | 4 |
| Cost per solved task | Not computable | $1.26 |
| Source | OpenRouter listing | OpenRouter listing |
Questions
Is Phi 4 better than Qwen3.8 27B for coding?
Only Qwen3.8 27B has a coding score, 74.2 on the Vibe Coding Index; Phi 4 has none, so the two cannot be ranked on coding. Phi 4 has the edge where output tokens cost 18.2x less.
Which is cheaper, Phi 4 or Qwen3.8 27B?
Phi 4 costs $0.07 per million input tokens and $0.14 per million output tokens; Qwen3.8 27B costs $0.425 and $2.55. Cost per solved task is known for Qwen3.8 27B only.
Which has the bigger context window, Phi 4 or Qwen3.8 27B?
Qwen3.8 27B, with 1M tokens against 16K.
How many benchmarks is the Phi 4 vs Qwen3.8 27B comparison based on?
32 benchmarks have a result for both models as of October 21, 2026. Phi 4's coding index rests on 0 independent benchmarks and Qwen3.8 27B's on 4. Where only one model has a result, the page says so instead of naming a winner.