Claude Haiku 4.5 · Coding
Claude Haiku 4.5 for coding: our test runs
Claude Haiku 4.5 ran our 5 coding prompts in llmwise, through the same pipeline your messages take. Here's every reply as it came, whether it passed, what it cost and what it counts as on Pro, next to the other models.
Based on 5 of our test runs on , through OpenRouter with the app's own prompt and settings. Updated .
Short answer
In our test runs on September 27, 2026, Claude Haiku 4.5 passed 3 of 5 of our coding prompts (neither hard one): 20th of 20 models. Each reply counted as 1 message on Pro, where it has 250 a month, and cost $0.0027 to run on average.
Prompt by prompt
Each of the 5 coding prompts, and how Claude Haiku 4.5's reply did.
| Prompt | Result | Cost | Time |
|---|---|---|---|
| Turn a title into a URL slugEveryday | Passed: All 7 tests passed. | $0.0010 | 1.5 s |
| Parse a duration like “1h 30m”Everyday | Passed: All 10 tests passed. | $0.0022 | 2.3 s |
| Merge overlapping intervalsEveryday | Passed: All 7 tests passed. | $0.0017 | 2.0 s |
| Evaluate an arithmetic expression, no evalHard | Failed: 14 of 15 tests passed. First failure: evaluate("-2 ^ 2"): Expected values to be strictly deep-equal: | $0.0056 | 7.6 s |
| Parse CSV with quoted fieldsHard | Failed: 5 of 8 tests passed. First failure: parseCsv('"line1\nline2",end\r\nnext,row\r\n'): Expected values to be strictly deep-equal: | $0.0033 | 3.5 s |
Every coding reply from Claude Haiku 4.5
Turn a title into a URL slug
An everyday prompt: “Turn a title into a URL slug”, in full.
Passed: All 7 tests passed.
```javascript function slugify(title) { return title .toLowerCase() .normalize('NFD') .replace(/[\u0300-\u036f]/g, '') .replace(/[^a-z0-9]+/g, '-') .replace(/^-+|-+$/g, ''); } ```526 tokens in, 86 out · 1.5 s · $0.0010 · 1 message on Pro · answered by anthropic/claude-haiku-4.5 via Amazon Bedrock ·
Parse a duration like “1h 30m”
An everyday prompt: “Parse a duration like “1h 30m””, in full.
Passed: All 10 tests passed.
```javascript function parseDuration(text) { // Trim whitespace from the input const trimmed = text.trim(); // Empty string is invalid if (trimmed === '') { return null; } // Regular expression to match valid duration format // Optional: number+h, then optional: number+m, then optional: number+s // With optional spaces between components const regex = /^\s*(\d+h)?\s*(\d+m)?\s*(\d+s)?\s*$/; const match = trimmed.match(regex); // No match means invalid format if (!match) { return null; } // At least one component must be present if (!match[1] && !match[2] && !match[3]) { return null; } let seconds = 0; // Parse hours if (match[1]) { seconds += parseInt(match[1]) * 3600; } // Parse minutes if (match[2]) { seconds += parseInt(match[2]) * 60; } // Parse seconds if (match[3]) { seconds += parseInt(match[3]); } return seconds; } ```495 tokens in, 334 out · 2.3 s · $0.0022 · 1 message on Pro · answered by anthropic/claude-haiku-4.5 via Amazon Bedrock ·
Merge overlapping intervals
An everyday prompt: “Merge overlapping intervals”, in full.
Passed: All 7 tests passed.
```javascript function mergeIntervals(intervals) { if (intervals.length === 0) return []; // Sort intervals by start time, then by end time const sorted = intervals.map(interval => [...interval]).sort((a, b) => { return a[0] - b[0] || a[1] - b[1]; }); const merged = [sorted[0]]; for (let i = 1; i < sorted.length; i++) { const current = sorted[i]; const last = merged[merged.length - 1]; // If current interval overlaps or touches the last merged interval if (current[0] <= last[1]) { // Merge by extending the end of the last interval last[1] = Math.max(last[1], current[1]); } else { // No overlap, add as new interval merged.push(current); } } return merged; } ```481 tokens in, 239 out · 2.0 s · $0.0017 · 1 message on Pro · answered by anthropic/claude-haiku-4.5 via Amazon Bedrock ·
Evaluate an arithmetic expression, no eval
A hard prompt: “Evaluate an arithmetic expression, no eval”, in full.
Failed: 14 of 15 tests passed. First failure: evaluate("-2 ^ 2"): Expected values to be strictly deep-equal:
```javascript function evaluate(expression) { const tokens = tokenize(expression); const parser = new Parser(tokens); const result = parser.parseExpression(); if (parser.pos !== tokens.length) { throw new Error("Unexpected tokens after expression"); } return result; } function tokenize(expression) { const tokens = []; let i = 0; while (i < expression.length) { const ch = expression[i]; if (/\s/.test(ch)) { i++; continue; } if (/\d/.test(ch)) { let num = ''; while (i < expression.length && /[\d.]/.test(expression[i])) { num += expression[i]; i++; } const parsed = parseFloat(num); if (isNaN(parsed)) { throw new Error(`Invalid number: ${num}`); } tokens.push({ type: 'NUMBER', value: parsed }); continue; } if ('+-*/^()'.includes(ch)) { tokens.push({ type: ch, value: ch }); i++; continue; } throw new Error(`Unexpected character: ${ch}`); } return tokens; } class Parser { constructor(tokens) { this.tokens = tokens; this.pos = 0; } peek() { return this.tokens[this.pos]; } consume() { return this.tokens[this.pos++]; } parseExpression() { return this.parseAddSub(); } parseAddSub() { let left = this.parseMulDiv(); while (this.peek() && (this.peek().type === '+' || this.peek().type === '-')) { const op = this.consume().type; const right = this.parseMulDiv(); left = op === '+' ? left + right : left - right; } return left; } parseMulDiv() { let left = this.parsePower(); while (this.peek() && (this.peek().type === '*' || this.peek().type === '/')) { const op = this.consume().type; const right = this.parsePower(); left = op === '*' ? left * right : left / right; } return left; } parsePower() { let left = this.parseUnary(); if (this.peek() && this.peek().type === '^') { this.consume(); const right = this.parsePower(); left = Math.pow(left, right); } return left; } parseUnary() { if (this.peek() && this.peek().type === '-') { this.consume(); return -this.parseUnary(); } if (this.peek() && this.peek().type === '+') { this.consume(); return this.parseUnary(); } return this.parsePrimary(); } parsePrimary() { const token = this.peek(); if (!token) { throw new Error("Unexpected end of expression"); } if (token.type === 'NUMBER') { this.consume(); return token.value; } if (token.type === '(') { this.consume(); const result = this.parseExpression(); if (!this.peek() || this.peek().type !== ')') { throw new Error("Missing closing parenthesis"); } this.consume(); return result; } throw new Error(`Unexpected token: ${token.value}`); } } ```599 tokens in, 1,007 out · 7.6 s · $0.0056 · 1 message on Pro · answered by anthropic/claude-haiku-4.5 via Amazon Bedrock ·
Parse CSV with quoted fields
A hard prompt: “Parse CSV with quoted fields”, in full.
Failed: 5 of 8 tests passed. First failure: parseCsv('"line1\nline2",end\r\nnext,row\r\n'): Expected values to be strictly deep-equal:
```javascript function parseCsv(text) { if (text === "") return []; const rows = []; let currentRow = []; let currentField = ""; let inQuotes = false; let i = 0; while (i < text.length) { const char = text[i]; if (inQuotes) { if (char === '"') { if (i + 1 < text.length && text[i + 1] === '"') { // "" inside quotes means a literal quote currentField += '"'; i += 2; } else { // End of quoted field inQuotes = false; i++; } } else { // Any character (including comma, newline) inside quotes is part of the field currentField += char; i++; } } else { if (char === '"') { // Start of quoted field inQuotes = true; i++; } else if (char === ",") { // Field separator currentRow.push(currentField); currentField = ""; i++; } else if (char === "\r") { // Handle \r\n or \r currentRow.push(currentField); currentField = ""; if (i + 1 < text.length && text[i + 1] === "\n") { i += 2; } else { i++; } // Only add row if there's more content after the line break if (i < text.length) { rows.push(currentRow); currentRow = []; } } else if (char === "\n") { // Row separator currentRow.push(currentField); currentField = ""; i++; // Only add row if there's more content after the line break if (i < text.length) { rows.push(currentRow); currentRow = []; } } else { // Ordinary character currentField += char; i++; } } } // Add the last field and row currentRow.push(currentField); rows.push(currentRow); return rows; } ```518 tokens in, 559 out · 3.5 s · $0.0033 · 1 message on Pro · answered by anthropic/claude-haiku-4.5 via Amazon Bedrock ·
How it compares on coding
Claude Haiku 4.5 beside the job's picks among every model. 18 models share the hard-problems pick, and Claude Haiku 4.5 isn't one of them.
| Model | Passed | On Pro | Cost per reply |
|---|---|---|---|
| GLM 5.3Our pick: hard problems (shared), best value | 5 of 5 | 250 a month on Pro | $0.0015 |
| GLM 5.3 FlashOur pick: hard problems (shared), everyday | 5 of 5 | 60 a day on Pro | $0.0003 |
| Claude Haiku 4.5 | 3 of 5 | 250 a month on Pro | $0.0027 |
Every limit is published. Paid plans also have a monthly fair-use limit on AI cost: Plus $3.75, Pro $7.50, Max $20, Ultra $42, Studio $85. Using every message on your plan at typical sizes stays under it; very large messages and heavy research use it faster. Every limit, explained.
Claude Haiku 4.5 next to each model on coding
Claude Haiku 4.5 against each model on the same 5 coding prompts. One run each, through OpenRouter: a wait depends on the provider and the load that day, so a lead under 10% counts as close.
Against Claude Fable 5.1: Claude Haiku 4.5 answered 2.4× sooner (2.3 s to 5.5 s), cost 15.5× less, and passed 3 of 5 to its 5. Only Claude Fable 5.1 passed Evaluate an arithmetic expression, no eval; Parse CSV with quoted fields.
Against Claude Opus 5.5: Claude Haiku 4.5 answered 3.1× sooner (2.3 s to 7.2 s), cost 6.2× less, and passed 3 of 5 to its 5. Only Claude Opus 5.5 passed Evaluate an arithmetic expression, no eval; Parse CSV with quoted fields.
Against Claude Sonnet 5.5: Claude Haiku 4.5 answered 1.2× later (2.3 s to 2.0 s), cost 2.3× less, and passed 3 of 5 to its 5. Only Claude Sonnet 5.5 passed Evaluate an arithmetic expression, no eval; Parse CSV with quoted fields.
Against Claude Sonnet 5: Claude Haiku 4.5 answered 1.1× sooner (2.3 s to 2.7 s), cost 3.7× less, and passed 3 of 5 to its 5. Only Claude Sonnet 5 passed Evaluate an arithmetic expression, no eval; Parse CSV with quoted fields.
Against Claude Haiku 5.5: Claude Haiku 4.5 answered 1.7× sooner (2.3 s to 3.9 s), cost 6.1× more, and passed 3 of 5 to its 5. Only Claude Haiku 5.5 passed Evaluate an arithmetic expression, no eval; Parse CSV with quoted fields.
Against GPT-6 Astra: Claude Haiku 4.5 answered 3.5× sooner (2.3 s to 8.2 s), cost 8.1× less, and passed 3 of 5 to its 5. Only GPT-6 Astra passed Evaluate an arithmetic expression, no eval; Parse CSV with quoted fields.
Against GPT-6.1 Sol: Claude Haiku 4.5 answered 2.0× sooner (2.3 s to 4.8 s), cost 1.2× more, and passed 3 of 5 to its 5. Only GPT-6.1 Sol passed Evaluate an arithmetic expression, no eval; Parse CSV with quoted fields.
Against GPT-6 Sol: Claude Haiku 4.5 answered 2.0× sooner (2.3 s to 4.8 s), cost 1.9× less, and passed 3 of 5 to its 5. Only GPT-6 Sol passed Evaluate an arithmetic expression, no eval; Parse CSV with quoted fields.
Against GPT-6 Luna: Claude Haiku 4.5 answered 1.9× sooner (2.3 s to 4.6 s), cost 9.6× more, and passed 3 of 5 to its 5. Only GPT-6 Luna passed Evaluate an arithmetic expression, no eval; Parse CSV with quoted fields.
Against Gemini 4 Argon: Claude Haiku 4.5 answered 1.5× sooner (2.3 s to 3.5 s), cost 1.1× more, and passed 3 of 5 to its 5. Only Gemini 4 Argon passed Evaluate an arithmetic expression, no eval; Parse CSV with quoted fields.
Against Gemini 3.1 Pro (preview): Claude Haiku 4.5 answered 4.4× sooner (2.3 s to 10.3 s), cost 7.1× less, and passed 3 of 5 to its 5. Only Gemini 3.1 Pro (preview) passed Evaluate an arithmetic expression, no eval; Parse CSV with quoted fields.
Against Gemini 3.8 Flash: Claude Haiku 4.5 answered 1.8× sooner (2.3 s to 4.2 s), cost 1.4× more, and passed 3 of 5 to its 5. Only Gemini 3.8 Flash passed Evaluate an arithmetic expression, no eval; Parse CSV with quoted fields.
Against DeepSeek V4.1 Flash: Claude Haiku 4.5 answered within 10% of its time (2.3 s to 2.5 s), cost 1.5× more, and passed 3 of 5 to its 5. Only DeepSeek V4.1 Flash passed Evaluate an arithmetic expression, no eval; Parse CSV with quoted fields.
Against DeepSeek V4 Pro: Claude Haiku 4.5 answered 51.0× sooner (2.3 s to 119.6 s), cost 8.7× less, and passed 3 of 5 to its 5. Only DeepSeek V4 Pro passed Evaluate an arithmetic expression, no eval; Parse CSV with quoted fields.
Against Grok 4.7: Claude Haiku 4.5 answered 13.5× sooner (2.3 s to 31.6 s), cost 8.9× less, and passed 3 of 5 to its 5. Only Grok 4.7 passed Evaluate an arithmetic expression, no eval; Parse CSV with quoted fields.
Against Kimi K3: Claude Haiku 4.5 answered 1.8× sooner (2.3 s to 4.1 s), cost 2.3× less, and passed 3 of 5 to its 5. Only Kimi K3 passed Evaluate an arithmetic expression, no eval; Parse CSV with quoted fields.
Against GLM 5.3: Claude Haiku 4.5 answered 2.2× later (2.3 s to 1.1 s), cost 1.9× more, and passed 3 of 5 to its 5. Only GLM 5.3 passed Evaluate an arithmetic expression, no eval; Parse CSV with quoted fields.
Against GLM 5.3 Flash: Claude Haiku 4.5 answered 3.6× sooner (2.3 s to 8.4 s), cost 10.9× more, and passed 3 of 5 to its 5. Only GLM 5.3 Flash passed Evaluate an arithmetic expression, no eval; Parse CSV with quoted fields.
Against Mistral Large 4: Claude Haiku 4.5 answered 15.7× sooner (2.3 s to 36.8 s), cost 2.6× less, and passed 3 of 5 to its 4. Only Mistral Large 4 passed Parse CSV with quoted fields.
How these runs were done
Tests. Automatic. The function runs against the prompt's tests in a separate Node.js process with a time limit and no file, network or child-process access; it passes when every test passes.
Claude Haiku 4.5, and coding, elsewhere
- Claude Haiku 4.5: price, limits and messages on every plan
- The best AI for coding: our picks among every model
- Claude for coding
- Claude Haiku 4.5 for writing: our test runs
- Claude Haiku 4.5 for math: our test runs
- Claude Haiku 4.5 for data analysis: our test runs
- Claude Haiku 5.5 vs Claude Haiku 4.5
- Claude Fable 5.1 vs Claude Haiku 4.5
- Claude Opus 5.5 vs Claude Haiku 4.5
- Claude Sonnet 5 vs Claude Haiku 4.5
- Claude Haiku 4.5 vs GPT-6 Sol
- Claude Haiku 4.5 vs GPT-6 Luna
- Claude Haiku 4.5 vs Gemini 3.1 Pro (preview)
- Claude Haiku 4.5 vs Gemini 3.8 Flash
- Claude Haiku 4.5 vs DeepSeek V4.1 Flash
- Claude Haiku 4.5 vs DeepSeek V4 Pro
- Claude Haiku 4.5 vs Grok 4.7
- Claude Haiku 4.5 vs Kimi K3
- Claude Haiku 4.5 vs GLM 5.3
- Claude Haiku 4.5 vs GLM 5.3 Flash
- Analyze a CSV with code: the prompt, and its price
- AI prompts for coding, checked by running the code
- Our test runs: 50 prompts on every model
Questions
Is Claude Haiku 4.5 good for coding?
In our test runs it passed 3 of 5 coding prompts, 20th of the 20 models in llmwise. Every reply is on this page, so you can judge them yourself.
How many of my messages does a coding reply from Claude Haiku 4.5 use?
1 message each on Pro, where it has 250 a month on Pro. The price of a message is fixed and shown before you send it, however long the reply.
How were these runs done?
The same way for every model: each prompt sent through llmwise's own pipeline, each reply checked the same way. The methods page has every prompt and how each is scored.
Claude, GPT, Gemini, DeepSeek, Grok, Kimi, GLM, and Mistral, in one chat.
See what a message costs before you send it. Free is 5 messages to try; sign in with an email link, no password or card.