In Google’s MedGemma 2 test, Python did the arithmetic
MedGemma 2 improved on Gemma 4 in Google Research’s clinical calculation test. In an example described by engineers Fereshteh Mahvar and Maddie Traverse, the model pulled inputs from a case and wrote Python. A small test program ran that code in an isolated environment.
On the MedCalc-Bench-Verified subset, Google Research reported a 10% relative accuracy gain over Gemma 4 for the 26B MoE variant and a 56% relative gain for the smaller E4B variant. Each gain uses the corresponding Gemma 4 variant as its baseline. Google Research · 2026-12-03
The result is specific to the benchmark. For a team prototyping a calculator, the setup points to two places to look when a result goes wrong. The model may have picked the wrong input or written the wrong calculation.
For one synthetic case, save the values MedGemma 2 extracts alongside the Python result so you can see where any error first appears.