Quick Answer

For calculations with several variables or that require precision, tell Claude to write and run Python instead of doing the math in prose. Code execution is deterministic where language generation is not.

Last Updated: August 2026 · Cole Bridges Research Lab

Verified Snapshot: Tested on Claude Sonnet 4.6, Reviewed August 2026 (current default: Sonnet 5)

Pre-calculation failure patterns and prompt fixes documented on live Claude Sonnet 4.6 API by Cole Bridges Research Lab.

Quick Answer

Claude Sonnet 4.6 produces wrong math when it generates the narrative answer and the calculation simultaneously. The fix is forcing a calculation-first structure: use a <scratchpad> tag to make Claude show all math before writing a single word of explanation.

Model status: checked August 6, 2026

Anthropic's current lineup is Claude Haiku 4.5, Claude Sonnet 5 (released June 30, 2026), Claude Opus 5 (released July 24, 2026), and Claude Fable 5, with Claude Mythos 5 restricted to approved partners. Sonnet 5 is the default model on the Free and Pro plans, Opus 5 is the default on Max and the strongest model available on Pro. Source: Anthropic.

The test runs on this page were performed on Claude Sonnet 4.6, which Sonnet 5 replaced as the default model on June 30, 2026. We publish these results as a dated snapshot rather than restating them as current-model behavior. Where a finding has not been re-tested on Sonnet 5 or Opus 5, treat it as history, not as a live bug report.

Why Claude Gets Math Wrong With Confidence

Claude Sonnet 4.6 is a language model, not a calculator. When you ask it a question that involves numbers, it generates tokens sequentially, which means it often commits to a narrative direction before it has fully resolved the calculation. The number it produces fits the narrative, not reality.

This is a Silent Failure, one of the most costly patterns in production AI use. Claude does not flag uncertainty. It delivers the wrong number at the same confidence level as a correct one, complete with explanation and formatting that makes it look authoritative.

The Pre-Calculation Prompt Fix

Force Claude to complete all math before generating any explanatory text. The scratchpad structure is the most reliable method tested on Sonnet 4.6:

<task>Calculate the total project cost and monthly payment.</task>

<data>
Project total: $48,500
Down payment: $5,000
Loan term: 36 months
Interest rate: 6.9% APR
</data>

<scratchpad>
Show all calculations here step by step before writing any summary.
Do not skip steps. Show each arithmetic operation.
</scratchpad>

<answer>
Only write the final summary after completing all scratchpad calculations.
</answer>
Why This Works

The <scratchpad> tag forces Claude to externalize its reasoning before committing to output. Once the math is written out in the scratchpad, Claude cannot contradict it in the answer section without creating an obvious inconsistency, which it avoids. In our testing on Sonnet 4.6, this structure sharply reduced arithmetic errors on multi-step financial calculations.

When to Use Code Execution Instead

For calculations with more than 4 variables or requiring precision beyond 2 decimal places, prompt Claude Sonnet 4.6 to write and execute Python code rather than calculate natively. Claude's code execution is deterministic in a way its language generation is not.

<task>Write and execute Python code to calculate this. Show the code and output.</task>
<data>[your numbers here]</data>
<requirement>Do not calculate manually. Write Python and run it.</requirement>

The 3 Highest-Risk Calculation Types

Calculation TypeWithout FixWith Scratchpad
Compound interest / loan amortizationFrequent errorsRare errors
Multi-step percentage calculationsFrequent errorsRare errors
Unit conversions across 3+ stepsFrequent errorsRare errors
Anthropic shipped Claude Sonnet 5 on June 30, 2026 and made it the default model for Free and Pro accounts, replacing Sonnet 4.6 across its consumer and developer products the same day.
Anthropic — Introducing Claude Sonnet 5

Model defaults move every few weeks now. Any technique you rely on needs a tested-on date attached, which is why every page here carries one.

Stanford HAI's 2026 AI Index puts organizational AI adoption at 88 percent, and finds generative AI reached 53 percent population adoption within three years — faster uptake than either the personal computer or the internet.
Stanford HAI — 2026 AI Index Report

Adoption is no longer the hard part. Getting reliable output is. That gap is what the testing on this site is built to close.