DeepSeek · Coding
DeepSeek for coding
llmwise has 2 of DeepSeek's models, from DeepSeek V4.1 Flash (up to 60 messages a day on Pro) to DeepSeek V4 Pro (up to 250 messages a month). We ran the same coding prompts on every one and published every reply: which DeepSeek model to use, from the results, what each costs per message, and how to get more out of it.
Based on 10 of our test runs on , through OpenRouter with the app's own prompt and settings. Updated .
Short answer
In our test runs on October 8, 2026, all 2 models passed 5 of 5 coding prompts, so these prompts don't pick one for hard problems. For value, DeepSeek V4 Pro (5 of 5), 250 a month on Pro; for everyday coding, DeepSeek V4.1 Flash (5 of 5), from the daily count.
Our picks for coding
Hard problems
Shared by 2 models
All 2 models passed 5 of 5, both hard ones: DeepSeek V4.1 Flash and DeepSeek V4 Pro. These prompts don't tell them apart, so they share the pick.
Best value
Passed 5 of 5 coding prompts, with 250 a month on Pro.
Everyday
Passed 5 of 5 coding prompts; an everyday model, so its messages come from the daily count (60 a day on Pro), not the monthly allowance.
These picks aren't our opinion: they're what the results below give, by these rules, among the DeepSeek models in llmwise. They change when the results do.
- Hard problems: the model that passed the most prompts and, of those, the most hard ones. Models level on both share the pick: the prompts don't tell them apart, so we don't break the tie by price or by name.
- Best value: among the models that draw on the monthly allowance, the one with the most messages on Pro that passed no more than one prompt fewer than the top model. Ties go to the one that passed more, then to the lower cost per reply.
- Everyday: among the cheapest models on the page (the everyday models, which come from the daily count, when the page has any), the one that passed the most. Ties go to the one that passed more of the hard prompts, then to the lower cost per reply.
Our coding test runs, model by model
How each model did on our 5 coding prompts, what each reply counted as on Pro, and what it cost to run.
| Model | Passed | Hard ones | Messages used on Pro | Cost per reply | Time per reply |
|---|---|---|---|---|---|
| DeepSeek V4 ProDeepSeek | 5 of 5 | 2 of 2 | 1 each, of 250 a month on Pro | $0.0240 | 79.6 s |
| DeepSeek V4.1 FlashDeepSeek | 5 of 5 | 2 of 2 | 1 each, of 60 a day on Pro | $0.0018 | 3.9 s |
One prompt, side by side
Each model's reply to “Evaluate an arithmetic expression, no eval”, as it came, with whether it passed and what it cost.
The prompt: Evaluate an arithmetic expression, no eval (hard)
Write a JavaScript function evaluate(expression) that computes an arithmetic expression given as a string and returns the number. It supports numbers like 3, 0.5 and 12.25; the operators + - * / and ^ (power); parentheses; unary minus; and spaces anywhere. - ^ binds tighter than unary minus and is right-associative, so -2^2 is -4 and 2^3^2 is 512. A unary minus may follow ^, as in 2^-1, which is 0.5. - * and / bind tighter than + and -. Otherwise operators of the same level go left to right, so 8/4/2 is 1. - Throw an Error for input that isn't a valid expression, such as "2 +", "(1" or "1 2". Don't use eval, Function or any library. Reply with the whole function in one ```javascript code block: plain JavaScript for Node.js 22, no imports, no TypeScript.
DeepSeek V4.1 Flash
Passed: All 15 tests passed.
```javascript function evaluate(expression) { if (typeof expression !== 'string') { throw new Error('Expression must be a string'); } // ---- Tokenizer ---- const tokens = []; let i = 0; const isDigit = (c) => c >= '0' && c <= '9'; while (i < expression.length) { const ch = expression[i]; if (ch === ' ' || ch === '\t') { i++; continue; } // number: digits with an optional single decimal point (at least one digit) if (isDigit(ch) || ch === '.') { let j = i; let digits = 0; while (j < expression.length && isDigit(expression[j])) { j++; digits++; } if (j < expression.length && expression[j] === '.') { j++; while (j < expression.length && isDigit(expression[j])) { j++; digits++; } } if (digits === 0) { throw new Error('Invalid number in expression'); } tokens.push({ type: 'num', value: parseFloat(expression.slice(i, j)) }); i = j; continue; } if ('+-*/^()'.indexOf(ch) !== -1) { tokens.push({ type: ch }); i++; continue; } throw new Error('Unexpected character: ' + ch); } if (tokens.length === 0) { throw new Error('Empty expression'); } // ---- Parser (recursive descent) ---- let pos = 0; const peek = () => tokens[pos]; const isOp = (tok, ch) => tok !== undefined && tok.type === ch; // expr := term (('+' | '-') term)* left-associative function parseExpression() { let value = parseTerm(); while (isOp(peek(), '+') || isOp(peek(), '-')) { const op = tokens[pos++].type; const rhs = parseTerm(); value = op === '+' ? value + rhs : value - rhs; } return value; } // term := unary (('*' | '/') unary)* left-associative function parseTerm() { let value = parseUnary(); while (isOp(peek(), '*') || isOp(peek(), '/')) { const op = tokens[pos++].type; const rhs = parseUnary(); value = op === '*' ? value * rhs : value / rhs; } return value; } // unary := ('-' | '+') unary | power // unary minus is looser than '^', so -2^2 === -(2^2) === -4 function parseUnary() { if (isOp(peek(), '-')) { pos++; return -parseUnary(); } if (isOp(peek(), '+')) { pos++; return parseUnary(); } return parsePower(); } // power := primary ('^' unary)? right-associative // the exponent is a unary, which permits 2^-1 and 2^3^2 = 2^(3^2) function parsePower() { const base = parsePrimary(); if (isOp(peek(), '^')) { pos++; const exponent = parseUnary(); return Math.pow(base, exponent); } return base; } // primary := number | '(' expr ')' function parsePrimary() { const tok = peek(); if (tok === undefined) { throw new Error('Unexpected end of expression'); } if (tok.type === 'num') { pos++; return tok.value; } if (tok.type === '(') { pos++; const value = parseExpression(); if (!isOp(peek(), ')')) { throw new Error('Missing closing parenthesis'); } pos++; return value; } throw new Error('Unexpected token: ' + tok.type); } const result = parseExpression(); if (pos !== tokens.length) { throw new Error('Unexpected token: ' + tokens[pos].type); } return result; } ```591 tokens in, 2,442 out (1,491 of them reasoning) · 5.8 s · $0.0030 · 1 message on Pro · answered by deepseek/deepseek-v4.1-flash via Together ·
DeepSeek V4 Pro
Passed: All 15 tests passed.
```javascript function evaluate(expression) { const s = expression; let i = 0; function skipSpaces() { while (i < s.length && s[i] === ' ') i++; } function isDigit(c) { return c >= '0' && c <= '9'; } function parsePrimary() { skipSpaces(); if (i >= s.length) { throw new Error('Unexpected end of input'); } const ch = s[i]; if (ch === '(') { i++; const value = parseAdd(); skipSpaces(); if (i >= s.length || s[i] !== ')') { throw new Error("Expected ')'"); } i++; return value; } if (isDigit(ch)) { return parseNumber(); } throw new Error('Unexpected token: ' + ch); } function parseNumber() { const start = i; while (i < s.length && isDigit(s[i])) i++; if (i < s.length && s[i] === '.') { i++; if (i >= s.length || !isDigit(s[i])) { throw new Error('Invalid number'); } while (i < s.length && isDigit(s[i])) i++; } return Number(s.slice(start, i)); } function parseUnary() { skipSpaces(); if (i < s.length && s[i] === '-') { i++; return -parseUnary(); } return parsePower(); } function parsePower() { const base = parsePrimary(); skipSpaces(); if (i < s.length && s[i] === '^') { i++; const exponent = parseUnary(); return base ** exponent; } return base; } function parseMul() { let left = parseUnary(); skipSpaces(); while (i < s.length && (s[i] === '*' || s[i] === '/')) { const op = s[i++]; const right = parseUnary(); if (op === '*') left *= right; else left /= right; skipSpaces(); } return left; } function parseAdd() { let left = parseMul(); skipSpaces(); while (i < s.length && (s[i] === '+' || s[i] === '-')) { const op = s[i++]; const right = parseMul(); if (op === '+') left += right; else left -= right; skipSpaces(); } return left; } skipSpaces(); const result = parseAdd(); skipSpaces(); if (i !== s.length) { throw new Error('Unexpected token: ' + s[i]); } return result; } ```563 tokens in, 10,967 out (10,346 of them reasoning) · 145.7 s · $0.0440 · 1 message on Pro · answered by deepseek/deepseek-v4-pro-0813 via Wafer ·
The coding prompts, and how they're scored
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.
Each prompt was sent the way llmwise sends a message in a side-by-side comparison, which offers no tools: the app's own system prompt, the model's own settings, and Pro's reply size limit (8,000 tokens). Read all five coding prompts and how every reply was scored.
Prompts like these to try yourself
DeepSeek in llmwise
| Model | On Pro | On Free | Context window | Images | PDFs | Reasoning | API price per 1M, in / out |
|---|---|---|---|---|---|---|---|
| DeepSeek V4 ProDeepSeek | 250/mo on Pro | Yes | 1.05M tokens | No | Text only | Yes | $0.40 / $4.00 |
| DeepSeek V4.1 FlashDeepSeek | 60/day on Pro | Yes | 1.05M tokens | Yes | Text only | Yes | $0.30 / $1.20 |
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.
What matters for coding
Room for your code
The more of your code a model can take in at once, the fewer details it has to guess. Context windows are listed below.
Reasoning on hard problems
Models that reason before answering tend to do better on problems with several moving parts, like a bug that crosses files.
Running the code
Code that has been run beats code that looks right. A model that can run and test its own code catches its own mistakes.
Cost per try
Coding means many small tries. A cheap model for quick questions and a stronger one for the hard ones keeps the cost down.
DeepSeek for coding in llmwise
Code opens as a document
Ask for a script or a component and it opens beside the chat as a code document that keeps every version, so you can step back to an earlier one.
Run code (paid plans)
On a paid plan the model can run Python or Node.js in an isolated sandbox once you approve it, read the output and fix what failed. A run counts as 1 Claude Haiku 4.5 message and stops after 60 seconds.
HTML apps run in the chat
Ask for a calculator, a small tool or a page and it runs live as an HTML app in the side panel.
Switch models mid-chat
Start on a cheaper model; if the answer isn't good enough, switch models in the same chat. The next model sees the whole conversation, so you don't paste anything twice.
DeepSeek models are served only through OpenRouter, by endpoints that don't store or train on prompts. See the Privacy Policy.
Tips
Paste the exact error and the code that produced it, not just a description.
Say which language, version and libraries you use.
For a big change, ask for a plan first, then one step at a time.
Pick the Coder persona for code-first answers that explain their trade-offs.
If a model gets stuck, switch to another in the same chat: it sees the code so far.
Questions
Is DeepSeek good for coding?
In our test runs on October 8, 2026, DeepSeek V4 Pro passed 5 of 5, DeepSeek V4.1 Flash passed 5 of 5 of our coding prompts, against a best result of 5 of 5 among all 19 models. Every reply is published on this page and the methods page, so you can judge them yourself.
Which DeepSeek model should I use for coding?
Start with DeepSeek V4.1 Flash for quick syntax questions, regexes, small scripts and boilerplate, and move up to DeepSeek V4 Pro for most day-to-day coding: writing functions, explaining code, reviewing a change.
Can I use DeepSeek for coding for free?
Yes: DeepSeek V4 Pro and DeepSeek V4.1 Flash are on the Free plan (a one-time trial of 5 messages).
Can llmwise run the code it writes?
On a paid plan, yes. The model writes Python or Node.js, you approve the run, and it executes in an isolated sandbox with no internet access except package registries, stopping after 60 seconds. It reads the output and can fix what failed. Each run counts as 1 Claude Haiku 4.5 message.
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.