Skip to content

Gemini 4 Carbon · Coding

Gemini 4 Carbon for coding: our test runs

Gemini 4 Carbon 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.

Short answer

In our test runs on November 17, 2026, Gemini 4 Carbon passed 5 of 5 of our coding prompts (both hard ones): tied 1st of 27 models. Each reply counted as 1 message on Pro, where it has 62 a month, and cost $0.0141 to run on average.

Prompt by prompt

Each of the 5 coding prompts, and how Gemini 4 Carbon's reply did.

Gemini 4 Carbon on each coding prompt
PromptResultCostTime
Turn a title into a URL slugEverydayPassed: All 7 tests passed.$0.006419.3 s
Parse a duration like “1h 30m”EverydayPassed: All 10 tests passed.$0.017139.9 s
Merge overlapping intervalsEverydayPassed: All 7 tests passed.$0.014136.4 s
Evaluate an arithmetic expression, no evalHardPassed: All 15 tests passed.$0.017653.6 s
Parse CSV with quoted fieldsHardPassed: All 8 tests passed.$0.015135.9 s

Every coding reply from Gemini 4 Carbon

  1. 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 String(title)
        .normalize("NFD")
        .replace(/\p{M}/gu, "")
        .toLowerCase()
        .replace(/[^a-z0-9]+/g, "-")
        .replace(/^-+|-+$/g, "");
    }
    ```

    736 tokens in, 1,130 out (1,049 of them reasoning) · 19.3 s · $0.0064 · 1 message on Pro · answered by google/gemini-4-carbon via Google AI Studio ·

  2. 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) {
      if (typeof text !== "string") {
        return null;
      }
    
      const match = /^\s*(?:(\d+)h)?\s*(?:(\d+)m)?\s*(?:(\d+)s)?\s*$/.exec(text);
      if (!match) {
        return null;
      }
    
      const [, h, m, s] = match;
      if (h === undefined && m === undefined && s === undefined) {
        return null;
      }
    
      return Number(h ?? 0) * 3600 + Number(m ?? 0) * 60 + Number(s ?? 0);
    }
    ```

    720 tokens in, 1,566 out (1,400 of them reasoning) · 39.9 s · $0.0171 · 1 message on Pro · answered by google/gemini-4-carbon via Google AI Studio ·

  3. 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 [];
      }
    
      const sorted = intervals.toSorted((a, b) =>
        a[0] !== b[0]
          ? a[0] < b[0] ? -1 : 1
          : a[1] < b[1] ? -1 : a[1] > b[1] ? 1 : 0
      );
    
      const merged = [[sorted[0][0], sorted[0][1]]];
    
      for (let i = 1; i < sorted.length; i++) {
        const [start, end] = sorted[i];
        const last = merged[merged.length - 1];
    
        if (start <= last[1]) {
          last[1] = Math.max(last[1], end);
        } else {
          merged.push([start, end]);
        }
      }
    
      return merged;
    }
    ```

    698 tokens in, 1,268 out (1,034 of them reasoning) · 36.4 s · $0.0141 · 1 message on Pro · answered by google/gemini-4-carbon via Google AI Studio ·

  4. Evaluate an arithmetic expression, no eval

    A hard prompt: “Evaluate an arithmetic expression, no eval”, in full.

    Passed: All 15 tests passed.

    ```javascript
    function evaluate(expression) {
      if (typeof expression !== "string") {
        throw new Error("Expression must be a string");
      }
    
      const tokens = [];
      let i = 0;
      const n = expression.length;
    
      while (i < n) {
        const ch = expression[i];
    
        if (ch === " " || ch === "\t" || ch === "\n" || ch === "\r") {
          i++;
          continue;
        }
    
        if (
          ch === "+" ||
          ch === "-" ||
          ch === "*" ||
          ch === "/" ||
          ch === "^" ||
          ch === "(" ||
          ch === ")"
        ) {
          tokens.push({ type: "op", value: ch });
          i++;
          continue;
        }
    
        if (ch >= "0" && ch <= "9") {
          const start = i;
          while (i < n && expression[i] >= "0" && expression[i] <= "9") {
            i++;
          }
          if (i < n && expression[i] === ".") {
            i++;
            if (i >= n || expression[i] < "0" || expression[i] > "9") {
              throw new Error(`Invalid number at position ${start}`);
            }
            while (i < n && expression[i] >= "0" && expression[i] <= "9") {
              i++;
            }
          }
          tokens.push({ type: "num", value: Number(expression.slice(start, i)) });
          continue;
        }
    
        throw new Error(`Unexpected character "${ch}" at position ${i}`);
      }
    
      let pos = 0;
    
      function peek() {
        return tokens[pos];
      }
    
      function consume() {
        return tokens[pos++];
      }
    
      // Expr := AddSub
      function parseExpr() {
        return parseAddSub();
      }
    
      // AddSub := MulDiv (('+' | '-') MulDiv)*
      function parseAddSub() {
        let left = parseMulDiv();
        while (
          peek() &&
          peek().type === "op" &&
          (peek().value === "+" || peek().value === "-")
        ) {
          const op = consume().value;
          const right = parseMulDiv();
          left = op === "+" ? left + right : left - right;
        }
        return left;
      }
    
      // MulDiv := Unary (('*' | '/') Unary)*
      function parseMulDiv() {
        let left = parseUnary();
        while (
          peek() &&
          peek().type === "op" &&
          (peek().value === "*" || peek().value === "/")
        ) {
          const op = consume().value;
          const right = parseUnary();
          left = op === "*" ? left * right : left / right;
        }
        return left;
      }
    
      // Unary := '-' Unary | Power
      function parseUnary() {
        if (peek() && peek().type === "op" && peek().value === "-") {
          consume();
          return -parseUnary();
        }
        return parsePower();
      }
    
      // Power := Primary ('^' Unary)?
      function parsePower() {
        const base = parsePrimary();
        if (peek() && peek().type === "op" && peek().value === "^") {
          consume();
          const exponent = parseUnary();
          return base ** exponent;
        }
        return base;
      }
    
      // Primary := Number | '(' Expr ')'
      function parsePrimary() {
        const tok = peek();
        if (!tok) {
          throw new Error("Unexpected end of expression");
        }
    
        if (tok.type === "num") {
          consume();
          return tok.value;
        }
    
        if (tok.type === "op" && tok.value === "(") {
          consume();
          const val = parseExpr();
          const closing = peek();
          if (!closing || closing.type !== "op" || closing.value !== ")") {
            throw new Error("Missing closing parenthesis");
          }
          consume();
          return val;
        }
    
        throw new Error(`Unexpected token "${tok.value}"`);
      }
    
      const result = parseExpr();
      if (pos !== tokens.length) {
        throw new Error(`Unexpected token "${tokens[pos].value}"`);
      }
    
      return result === 0 ? 0 : result;
    }
    ```

    809 tokens in, 3,355 out (2,305 of them reasoning) · 53.6 s · $0.0176 · 1 message on Pro · answered by google/gemini-4-carbon via Google AI Studio ·

  5. Parse CSV with quoted fields

    A hard prompt: “Parse CSV with quoted fields”, in full.

    Passed: All 8 tests passed.

    ```javascript
    function parseCsv(text) {
      if (text.length === 0) {
        return [];
      }
    
      const rows = [];
      let row = [];
      let field = "";
      let inQuotes = false;
      let atFieldStart = true;
    
      for (let i = 0; i < text.length; i++) {
        const ch = text[i];
    
        if (inQuotes) {
          if (ch === '"') {
            if (text[i + 1] === '"') {
              field += '"';
              i++;
            } else {
              inQuotes = false;
            }
          } else {
            field += ch;
          }
        } else if (atFieldStart && ch === '"') {
          inQuotes = true;
          atFieldStart = false;
        } else if (ch === ",") {
          row.push(field);
          field = "";
          atFieldStart = true;
        } else if (ch === "\n" || (ch === "\r" && text[i + 1] === "\n")) {
          if (ch === "\r") {
            i++;
          }
          row.push(field);
          rows.push(row);
          if (i === text.length - 1) {
            return rows;
          }
          row = [];
          field = "";
          atFieldStart = true;
        } else {
          field += ch;
          atFieldStart = false;
        }
      }
    
      row.push(field);
      rows.push(row);
      return rows;
    }
    ```

    736 tokens in, 2,879 out (2,497 of them reasoning) · 35.9 s · $0.0151 · 1 message on Pro · answered by google/gemini-4-carbon via Google AI Studio ·

How it compares on coding

Gemini 4 Carbon beside the job's picks among every model. 25 models share the hard-problems pick, Gemini 4 Carbon among them.

Gemini 4 Carbon beside other models on coding
ModelPassedOn ProCost per reply
Gemini 3.8 FlashOur pick: hard problems (shared), best value5 of 5250 a month on Pro$0.0011
GPT-6 LunaOur pick: hard problems (shared), everyday5 of 560 a day on Pro$0.0001
Gemini 4 CarbonOur pick: hard problems (shared)5 of 562 a month on Pro$0.0141
On Pro: Pro's count on each model. Cost: what OpenRouter charged us per reply, on average.

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.

Gemini 4 Carbon next to each model on coding

Gemini 4 Carbon 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.2: Gemini 4 Carbon answered 8.8× later (36.4 s to 4.1 s), cost 1.8× less, and passed 5 of 5 to its 5.

  • Against Claude Fable 5.1: Gemini 4 Carbon answered 8.1× later (36.4 s to 4.5 s), cost 2.4× less, and passed 5 of 5 to its 5.

  • Against Claude Opus 5.5: Gemini 4 Carbon answered 6.3× later (36.4 s to 5.7 s), cost 1.3× less, and passed 5 of 5 to its 5.

  • Against Claude Sonnet 5.5: Gemini 4 Carbon answered 14.7× later (36.4 s to 2.5 s), cost 2.8× more, and passed 5 of 5 to its 5.

  • Against Claude Sonnet 5: Gemini 4 Carbon answered 13.8× later (36.4 s to 2.6 s), cost 1.4× more, and passed 5 of 5 to its 5.

  • Against Claude Haiku 5.5: Gemini 4 Carbon answered 28.3× later (36.4 s to 1.3 s), cost 35.4× more, and passed 5 of 5 to its 5.

  • Against Claude Haiku 4.5: Gemini 4 Carbon answered 16.7× later (36.4 s to 2.2 s), cost 4.7× more, and passed 5 of 5 to its 3. Only Gemini 4 Carbon passed Evaluate an arithmetic expression, no eval; Parse CSV with quoted fields.

  • Against GPT-6.2 Astra: Gemini 4 Carbon answered 10.3× later (36.4 s to 3.5 s), cost within 10% of it, and passed 5 of 5 to its 5.

  • Against GPT-6 Astra: Gemini 4 Carbon answered 6.3× later (36.4 s to 5.8 s), cost 1.3× more, and passed 5 of 5 to its 5.

  • Against GPT-6.2 Sol: Gemini 4 Carbon answered 9.7× later (36.4 s to 3.8 s), cost 3.8× more, and passed 5 of 5 to its 5.

  • Against GPT-6.1 Sol: Gemini 4 Carbon answered 4.6× later (36.4 s to 7.9 s), cost 3.4× more, and passed 5 of 5 to its 5.

  • Against GPT-6 Sol: Gemini 4 Carbon answered 7.6× later (36.4 s to 4.8 s), cost 5.0× more, and passed 5 of 5 to its 5.

  • Against GPT-6.1 Terra: Gemini 4 Carbon answered 5.4× later (36.4 s to 6.8 s), cost 10.6× more, and passed 5 of 5 to its 5.

  • Against GPT-6 Luna: Gemini 4 Carbon answered 5.0× later (36.4 s to 7.3 s), cost 99.5× more, and passed 5 of 5 to its 5.

  • Against Gemini 4 Argon: Gemini 4 Carbon answered 4.8× later (36.4 s to 7.6 s), cost 5.4× more, and passed 5 of 5 to its 5.

  • Against Gemini 4 Hydrogen: Gemini 4 Carbon answered 5.3× later (36.4 s to 6.9 s), cost 2.3× more, and passed 5 of 5 to its 5.

  • Against Gemini 3.1 Pro (preview): Gemini 4 Carbon answered 2.3× later (36.4 s to 15.7 s), cost within 10% of it, and passed 5 of 5 to its 5.

  • Against Gemini 3.8 Flash: Gemini 4 Carbon answered 11.1× later (36.4 s to 3.3 s), cost 12.7× more, and passed 5 of 5 to its 5.

  • Against DeepSeek V4.1 Flash: Gemini 4 Carbon answered 10.4× later (36.4 s to 3.5 s), cost 9.6× more, and passed 5 of 5 to its 5.

  • Against DeepSeek V4 Pro: Gemini 4 Carbon answered 3.2× later (36.4 s to 11.3 s), cost 1.2× more, and passed 5 of 5 to its 5.

  • Against Grok 4.7: Gemini 4 Carbon answered 1.2× later (36.4 s to 31.2 s), cost 1.9× less, and passed 5 of 5 to its 5.

  • Against Kimi K3.1 Pro: Gemini 4 Carbon answered 4.6× later (36.4 s to 7.8 s), cost 1.9× more, and passed 5 of 5 to its 5.

  • Against Kimi K3: Gemini 4 Carbon answered 5.9× later (36.4 s to 6.2 s), cost 1.9× more, and passed 5 of 5 to its 5.

  • Against GLM 5.3: Gemini 4 Carbon answered 24.6× later (36.4 s to 1.5 s), cost 6.2× more, and passed 5 of 5 to its 3. Only Gemini 4 Carbon passed Parse a duration like “1h 30m”; Parse CSV with quoted fields.

  • Against GLM 5.3 Flash: Gemini 4 Carbon answered 34.1× later (36.4 s to 1.1 s), cost 53.9× more, and passed 5 of 5 to its 5.

  • Against Mistral Large 4: Gemini 4 Carbon answered 1.3× sooner (36.4 s to 46.9 s), cost 1.9× more, and passed 5 of 5 to its 5.

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.

How the runs were done, and every coding prompt.

Gemini 4 Carbon, and coding, elsewhere

Questions

Is Gemini 4 Carbon good for coding?

In our test runs it passed 5 of 5 coding prompts, tied 1st of the 27 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 Gemini 4 Carbon use?

1 message each on Pro, where it has 62 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. Every plan is month to month: cancel in two clicks. Sign in with an email link, no password.