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): 15th of 15 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. 13 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: 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.
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
- Analyze a CSV with code: the prompt, and its price
- 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, 15th of the 15 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, and GLM, 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.