Claude Sonnet 5 vs Gemma 4 31B
Same documents, same prompt: where each model gets it right, what it really costs, and how fast it responds.
Verdict
Claude Sonnet 5 is more accurate; Gemma 4 31B is cheaper in 30 of 30 combinations.
More accurate
Claude Sonnet 5
wins 14 of 30
Cheaper
Gemma 4 31B
cheaper in 30 of 30
Faster
Gemma 4 31B
2.9 sec vs 3.6 sec
Fewer fixes
Gemma 4 31B
27 vs 33 documents per 1,000
Across 30 task and document-language combinations (speed and fixes: median).
At a glance
| Accuracy (correct fields) | Per 1,000 documents | |||||
|---|---|---|---|---|---|---|
| Task · documents | Claude Sonnet 5 | Gemma 4 31B | Difference | Claude Sonnet 5 | Gemma 4 31B | Difference |
| Invoice extraction | 99.82% | 97.64% | ▼ 2.18 | $8.84 | $0.17 | −98 % |
| Email triage | 98.22% | 96.52% | ▼ 1.7 | $4.01 | $0.12 | −97 % |
| Personal data detection | 99.71% | 99.90% | ▲ 0.19 | $3.50 | $0.08 | −98 % |
| Contract clauses | 100.00% | 99.64% | ▼ 0.36 | $5.04 | $0.18 | −96 % |
| Document summaries | 96.00% | 100.00% | ▲ 4 | $4.08 | $0.13 | −97 % |
| Questions about a document | 100.00% | 100.00% | ±0 | $3.88 | $0.15 | −96 % |
| Accuracy (correct fields) | Per 1,000 documents | |||||
|---|---|---|---|---|---|---|
| Task · documents | Claude Sonnet 5 | Gemma 4 31B | Difference | Claude Sonnet 5 | Gemma 4 31B | Difference |
| Invoice extraction | 100.00% | 96.10% | ▼ 3.9 | $9.41 | $0.21 | −98 % |
| Email triage | 98.15% | 97.11% | ▼ 1.04 | $4.91 | $0.16 | −97 % |
| Personal data detection | 98.86% | 99.81% | ▲ 0.95 | $4.06 | $0.12 | −97 % |
| Contract clauses | 100.00% | 99.95% | ▼ 0.05 | $6.05 | $0.25 | −96 % |
| Document summaries | 93.44% | 100.00% | ▲ 6.56 | $6.48 | $0.19 | −97 % |
| Questions about a document | 100.00% | 100.00% | ±0 | $5.14 | $0.21 | −96 % |
| Accuracy (correct fields) | Per 1,000 documents | |||||
|---|---|---|---|---|---|---|
| Task · documents | Claude Sonnet 5 | Gemma 4 31B | Difference | Claude Sonnet 5 | Gemma 4 31B | Difference |
| Invoice extraction | 98.97% | 94.87% | ▼ 4.1 | $10.42 | $0.20 | −98 % |
| Email triage | 97.85% | 95.11% | ▼ 2.74 | $5.11 | $0.15 | −97 % |
| Personal data detection | 99.71% | 99.90% | ▲ 0.19 | $4.40 | $0.10 | −98 % |
| Contract clauses | 98.21% | 94.41% | ▼ 3.8 | $7.11 | $0.22 | −97 % |
| Document summaries | 99.11% | 100.00% | ▲ 0.89 | $5.97 | $0.16 | −97 % |
| Questions about a document | 100.00% | 100.00% | ±0 | $5.49 | $0.18 | −97 % |
| Accuracy (correct fields) | Per 1,000 documents | |||||
|---|---|---|---|---|---|---|
| Task · documents | Claude Sonnet 5 | Gemma 4 31B | Difference | Claude Sonnet 5 | Gemma 4 31B | Difference |
| Invoice extraction | 98.46% | 94.62% | ▼ 3.84 | $11.51 | $0.20 | −98 % |
| Email triage | 97.56% | 97.11% | ▼ 0.45 | $5.04 | $0.15 | −97 % |
| Personal data detection | 99.81% | 99.90% | ▲ 0.09 | $4.38 | $0.10 | −98 % |
| Contract clauses | 100.00% | 94.41% | ▼ 5.59 | $6.58 | $0.24 | −96 % |
| Document summaries | 94.22% | 99.67% | ▲ 5.45 | $6.32 | $0.16 | −98 % |
| Questions about a document | 100.00% | 100.00% | ±0 | $4.94 | $0.18 | −96 % |
| Accuracy (correct fields) | Per 1,000 documents | |||||
|---|---|---|---|---|---|---|
| Task · documents | Claude Sonnet 5 | Gemma 4 31B | Difference | Claude Sonnet 5 | Gemma 4 31B | Difference |
| Invoice extraction | 99.69% | 93.54% | ▼ 6.15 | $10.69 | $0.22 | −98 % |
| Email triage | 98.67% | 96.22% | ▼ 2.45 | $4.64 | $0.16 | −97 % |
| Personal data detection | 99.71% | 99.81% | ▲ 0.1 | $4.10 | $0.12 | −97 % |
| Contract clauses | 99.95% | 94.62% | ▼ 5.33 | $6.69 | $0.26 | −96 % |
| Document summaries | 96.78% | 99.11% | ▲ 2.33 | $5.04 | $0.16 | −97 % |
| Questions about a document | 100.00% | 100.00% | ±0 | $4.93 | $0.19 | −96 % |
Difference: Gemma 4 31B vs. Claude Sonnet 5; accuracy in percentage points, price in percent. The better value is in bold. Click a task to see the details.
Invoice extraction · English (US) (150 documents)
Claude Sonnet 5 is more accurate by 2.2 pp. Gemma 4 31B is 52.8× cheaper.
| Metric | Claude Sonnet 5 | Gemma 4 31B |
|---|---|---|
| Correct fields | 99.82% | 97.64% |
| Error-free documents | 98.67% | 81.33% |
| Per 1,000 documents | $8.84 | $0.17 |
| To fix / 1,000 | 13 | 187 |
| Speed (median) | 3.2 sec | 8.9 sec |
| Valid answers | 100.00% | 100.00% |
Free with login
Accuracy field by field and the documents where the models differ.
Just your email, no password.
Invoice extraction · Czech (150 documents)
Claude Sonnet 5 is more accurate by 3.9 pp. Gemma 4 31B is 44.4× cheaper.
| Metric | Claude Sonnet 5 | Gemma 4 31B |
|---|---|---|
| Correct fields | 100.00% | 96.10% |
| Error-free documents | 100.00% | 66.67% |
| Per 1,000 documents | $9.41 | $0.21 |
| To fix / 1,000 | 0 | 333 |
| Speed (median) | 3.6 sec | 10.4 sec |
| Valid answers | 100.00% | 100.00% |
Free with login
Accuracy field by field and the documents where the models differ.
Just your email, no password.
Invoice extraction · German (150 documents)
Claude Sonnet 5 is more accurate by 4.1 pp. Gemma 4 31B is 52.3× cheaper.
| Metric | Claude Sonnet 5 | Gemma 4 31B |
|---|---|---|
| Correct fields | 98.97% | 94.87% |
| Error-free documents | 86.67% | 64.00% |
| Per 1,000 documents | $10.42 | $0.20 |
| To fix / 1,000 | 133 | 360 |
| Speed (median) | 3.8 sec | 7.7 sec |
| Valid answers | 100.00% | 100.00% |
Free with login
Accuracy field by field and the documents where the models differ.
Just your email, no password.
Invoice extraction · Spanish (150 documents)
Claude Sonnet 5 is more accurate by 3.8 pp. Gemma 4 31B is 56.9× cheaper.
| Metric | Claude Sonnet 5 | Gemma 4 31B |
|---|---|---|
| Correct fields | 98.46% | 94.62% |
| Error-free documents | 81.33% | 50.67% |
| Per 1,000 documents | $11.51 | $0.20 |
| To fix / 1,000 | 187 | 493 |
| Speed (median) | 4.2 sec | 7.4 sec |
| Valid answers | 100.00% | 100.00% |
Free with login
Accuracy field by field and the documents where the models differ.
Just your email, no password.
Invoice extraction · French (150 documents)
Claude Sonnet 5 is more accurate by 6.2 pp. Gemma 4 31B is 48.5× cheaper.
| Metric | Claude Sonnet 5 | Gemma 4 31B |
|---|---|---|
| Correct fields | 99.69% | 93.54% |
| Error-free documents | 96.67% | 50.67% |
| Per 1,000 documents | $10.69 | $0.22 |
| To fix / 1,000 | 33 | 493 |
| Speed (median) | 4.4 sec | 6.5 sec |
| Valid answers | 100.00% | 100.00% |
Free with login
Accuracy field by field and the documents where the models differ.
Just your email, no password.
Email triage · English (US) (150 documents)
Claude Sonnet 5 is more accurate by 1.7 pp. Gemma 4 31B is 33.2× cheaper.
| Metric | Claude Sonnet 5 | Gemma 4 31B |
|---|---|---|
| Correct fields | 98.22% | 96.52% |
| Error-free documents | 84.00% | 72.00% |
| Per 1,000 documents | $4.01 | $0.12 |
| To fix / 1,000 | 160 | 280 |
| Speed (median) | 3.8 sec | 2.2 sec |
| Valid answers | 100.00% | 100.00% |
Free with login
Accuracy field by field and the documents where the models differ.
Just your email, no password.
Email triage · Czech (150 documents)
Claude Sonnet 5 is more accurate by 1 pp. Gemma 4 31B is 30.9× cheaper.
| Metric | Claude Sonnet 5 | Gemma 4 31B |
|---|---|---|
| Correct fields | 98.15% | 97.11% |
| Error-free documents | 83.33% | 74.67% |
| Per 1,000 documents | $4.91 | $0.16 |
| To fix / 1,000 | 167 | 253 |
| Speed (median) | 4.7 sec | 2.5 sec |
| Valid answers | 100.00% | 100.00% |
Free with login
Accuracy field by field and the documents where the models differ.
Just your email, no password.
Email triage · German (150 documents)
Claude Sonnet 5 is more accurate by 2.7 pp. Gemma 4 31B is 34.5× cheaper.
| Metric | Claude Sonnet 5 | Gemma 4 31B |
|---|---|---|
| Correct fields | 97.85% | 95.11% |
| Error-free documents | 81.33% | 62.00% |
| Per 1,000 documents | $5.11 | $0.15 |
| To fix / 1,000 | 187 | 380 |
| Speed (median) | 4.3 sec | 3.6 sec |
| Valid answers | 100.00% | 100.00% |
Free with login
Accuracy field by field and the documents where the models differ.
Just your email, no password.
Email triage · Spanish (150 documents)
Claude Sonnet 5 is more accurate by 0.5 pp. Gemma 4 31B is 34.6× cheaper.
| Metric | Claude Sonnet 5 | Gemma 4 31B |
|---|---|---|
| Correct fields | 97.56% | 97.11% |
| Error-free documents | 78.67% | 74.00% |
| Per 1,000 documents | $5.04 | $0.15 |
| To fix / 1,000 | 213 | 260 |
| Speed (median) | 5.5 sec | 2.2 sec |
| Valid answers | 100.00% | 100.00% |
Free with login
Accuracy field by field and the documents where the models differ.
Just your email, no password.
Email triage · French (150 documents)
Claude Sonnet 5 is more accurate by 2.4 pp. Gemma 4 31B is 29.1× cheaper.
| Metric | Claude Sonnet 5 | Gemma 4 31B |
|---|---|---|
| Correct fields | 98.67% | 96.22% |
| Error-free documents | 88.00% | 68.67% |
| Per 1,000 documents | $4.64 | $0.16 |
| To fix / 1,000 | 120 | 313 |
| Speed (median) | 4.3 sec | 2.4 sec |
| Valid answers | 100.00% | 100.00% |
Free with login
Accuracy field by field and the documents where the models differ.
Just your email, no password.
Personal data detection · English (US) (150 documents)
Gemma 4 31B is more accurate by 0.2 pp. Gemma 4 31B is 41.4× cheaper.
| Metric | Claude Sonnet 5 | Gemma 4 31B |
|---|---|---|
| Correct fields | 99.71% | 99.90% |
| Error-free documents | 98.00% | 99.33% |
| Per 1,000 documents | $3.50 | $0.08 |
| To fix / 1,000 | 20 | 7 |
| Speed (median) | 2.5 sec | 2.4 sec |
| Valid answers | 100.00% | 100.00% |
Free with login
Accuracy field by field and the documents where the models differ.
Just your email, no password.
Personal data detection · Czech (150 documents)
Gemma 4 31B is more accurate by 0.9 pp. Gemma 4 31B is 34.1× cheaper.
| Metric | Claude Sonnet 5 | Gemma 4 31B |
|---|---|---|
| Correct fields | 98.86% | 99.81% |
| Error-free documents | 92.00% | 98.67% |
| Per 1,000 documents | $4.06 | $0.12 |
| To fix / 1,000 | 80 | 13 |
| Speed (median) | 3.2 sec | 2.9 sec |
| Valid answers | 100.00% | 100.00% |
Free with login
Accuracy field by field and the documents where the models differ.
Just your email, no password.
Personal data detection · German (150 documents)
Gemma 4 31B is more accurate by 0.2 pp. Gemma 4 31B is 43.2× cheaper.
| Metric | Claude Sonnet 5 | Gemma 4 31B |
|---|---|---|
| Correct fields | 99.71% | 99.90% |
| Error-free documents | 98.00% | 99.33% |
| Per 1,000 documents | $4.40 | $0.10 |
| To fix / 1,000 | 20 | 7 |
| Speed (median) | 3.7 sec | 1.9 sec |
| Valid answers | 100.00% | 100.00% |
Free with login
Accuracy field by field and the documents where the models differ.
Just your email, no password.
Personal data detection · Spanish (150 documents)
Gemma 4 31B is more accurate by 0.1 pp. Gemma 4 31B is 42.3× cheaper.
| Metric | Claude Sonnet 5 | Gemma 4 31B |
|---|---|---|
| Correct fields | 99.81% | 99.90% |
| Error-free documents | 98.67% | 99.33% |
| Per 1,000 documents | $4.38 | $0.10 |
| To fix / 1,000 | 13 | 7 |
| Speed (median) | 3.6 sec | 3.6 sec |
| Valid answers | 100.00% | 100.00% |
Free with login
Accuracy field by field and the documents where the models differ.
Just your email, no password.
Personal data detection · French (150 documents)
Gemma 4 31B is more accurate by 0.1 pp. Gemma 4 31B is 34.2× cheaper.
| Metric | Claude Sonnet 5 | Gemma 4 31B |
|---|---|---|
| Correct fields | 99.71% | 99.81% |
| Error-free documents | 98.00% | 98.67% |
| Per 1,000 documents | $4.10 | $0.12 |
| To fix / 1,000 | 20 | 13 |
| Speed (median) | 2.5 sec | 4.3 sec |
| Valid answers | 100.00% | 100.00% |
Free with login
Accuracy field by field and the documents where the models differ.
Just your email, no password.
Contract clauses · English (US) (150 documents)
Claude Sonnet 5 is more accurate by 0.4 pp. Gemma 4 31B is 28× cheaper.
| Metric | Claude Sonnet 5 | Gemma 4 31B |
|---|---|---|
| Correct fields | 100.00% | 99.64% |
| Error-free documents | 100.00% | 97.33% |
| Per 1,000 documents | $5.04 | $0.18 |
| To fix / 1,000 | 0 | 27 |
| Speed (median) | 3.4 sec | 2.5 sec |
| Valid answers | 100.00% | 100.00% |
Free with login
Accuracy field by field and the documents where the models differ.
Just your email, no password.
Contract clauses · Czech (150 documents)
Both are equally accurate. Gemma 4 31B is 23.8× cheaper.
| Metric | Claude Sonnet 5 | Gemma 4 31B |
|---|---|---|
| Correct fields | 100.00% | 99.95% |
| Error-free documents | 100.00% | 99.33% |
| Per 1,000 documents | $6.05 | $0.25 |
| To fix / 1,000 | 0 | 7 |
| Speed (median) | 3.6 sec | 6.0 sec |
| Valid answers | 100.00% | 100.00% |
Free with login
Accuracy field by field and the documents where the models differ.
Just your email, no password.
Contract clauses · German (150 documents)
Claude Sonnet 5 is more accurate by 3.8 pp. Gemma 4 31B is 32.3× cheaper.
| Metric | Claude Sonnet 5 | Gemma 4 31B |
|---|---|---|
| Correct fields | 98.21% | 94.41% |
| Error-free documents | 86.67% | 27.33% |
| Per 1,000 documents | $7.11 | $0.22 |
| To fix / 1,000 | 133 | 727 |
| Speed (median) | 4.3 sec | 2.6 sec |
| Valid answers | 100.00% | 100.00% |
Free with login
Accuracy field by field and the documents where the models differ.
Just your email, no password.
Contract clauses · Spanish (150 documents)
Claude Sonnet 5 is more accurate by 5.6 pp. Gemma 4 31B is 27.7× cheaper.
| Metric | Claude Sonnet 5 | Gemma 4 31B |
|---|---|---|
| Correct fields | 100.00% | 94.41% |
| Error-free documents | 100.00% | 27.33% |
| Per 1,000 documents | $6.58 | $0.24 |
| To fix / 1,000 | 0 | 727 |
| Speed (median) | 4.0 sec | 5.0 sec |
| Valid answers | 100.00% | 100.00% |
Free with login
Accuracy field by field and the documents where the models differ.
Just your email, no password.
Contract clauses · French (150 documents)
Claude Sonnet 5 is more accurate by 5.3 pp. Gemma 4 31B is 26.2× cheaper.
| Metric | Claude Sonnet 5 | Gemma 4 31B |
|---|---|---|
| Correct fields | 99.95% | 94.62% |
| Error-free documents | 99.33% | 30.67% |
| Per 1,000 documents | $6.69 | $0.26 |
| To fix / 1,000 | 7 | 693 |
| Speed (median) | 4.6 sec | 5.3 sec |
| Valid answers | 100.00% | 100.00% |
Free with login
Accuracy field by field and the documents where the models differ.
Just your email, no password.
Document summaries · English (US) (150 documents)
Gemma 4 31B is more accurate by 4 pp. Gemma 4 31B is 32× cheaper.
| Metric | Claude Sonnet 5 | Gemma 4 31B |
|---|---|---|
| Correct fields | 96.00% | 100.00% |
| Error-free documents | 76.67% | 100.00% |
| Per 1,000 documents | $4.08 | $0.13 |
| To fix / 1,000 | 233 | 0 |
| Speed (median) | 2.9 sec | 2.2 sec |
| Valid answers | 100.00% | 100.00% |
Free with login
Accuracy field by field and the documents where the models differ.
Just your email, no password.
Document summaries · Czech (150 documents)
Gemma 4 31B is more accurate by 6.6 pp. Gemma 4 31B is 34.2× cheaper.
| Metric | Claude Sonnet 5 | Gemma 4 31B |
|---|---|---|
| Correct fields | 93.44% | 100.00% |
| Error-free documents | 68.00% | 100.00% |
| Per 1,000 documents | $6.48 | $0.19 |
| To fix / 1,000 | 320 | 0 |
| Speed (median) | 4.7 sec | 3.4 sec |
| Valid answers | 100.00% | 100.00% |
Free with login
Accuracy field by field and the documents where the models differ.
Just your email, no password.
Document summaries · German (150 documents)
Gemma 4 31B is more accurate by 0.9 pp. Gemma 4 31B is 36.7× cheaper.
| Metric | Claude Sonnet 5 | Gemma 4 31B |
|---|---|---|
| Correct fields | 99.11% | 100.00% |
| Error-free documents | 96.00% | 100.00% |
| Per 1,000 documents | $5.97 | $0.16 |
| To fix / 1,000 | 40 | 0 |
| Speed (median) | 3.6 sec | 2.9 sec |
| Valid answers | 100.00% | 100.00% |
Free with login
Accuracy field by field and the documents where the models differ.
Just your email, no password.
Document summaries · Spanish (150 documents)
Gemma 4 31B is more accurate by 5.4 pp. Gemma 4 31B is 40.2× cheaper.
| Metric | Claude Sonnet 5 | Gemma 4 31B |
|---|---|---|
| Correct fields | 94.22% | 99.67% |
| Error-free documents | 68.00% | 98.00% |
| Per 1,000 documents | $6.32 | $0.16 |
| To fix / 1,000 | 320 | 20 |
| Speed (median) | 3.4 sec | 2.6 sec |
| Valid answers | 100.00% | 100.00% |
Free with login
Accuracy field by field and the documents where the models differ.
Just your email, no password.
Document summaries · French (150 documents)
Gemma 4 31B is more accurate by 2.3 pp. Gemma 4 31B is 30.7× cheaper.
| Metric | Claude Sonnet 5 | Gemma 4 31B |
|---|---|---|
| Correct fields | 96.78% | 99.11% |
| Error-free documents | 80.67% | 94.67% |
| Per 1,000 documents | $5.04 | $0.16 |
| To fix / 1,000 | 193 | 53 |
| Speed (median) | 3.1 sec | 3.2 sec |
| Valid answers | 100.00% | 100.00% |
Free with login
Accuracy field by field and the documents where the models differ.
Just your email, no password.
Questions about a document · English (US) (150 documents)
Both are equally accurate. Gemma 4 31B is 25× cheaper.
| Metric | Claude Sonnet 5 | Gemma 4 31B |
|---|---|---|
| Correct fields | 100.00% | 100.00% |
| Error-free documents | 100.00% | 100.00% |
| Per 1,000 documents | $3.88 | $0.15 |
| To fix / 1,000 | 0 | 0 |
| Speed (median) | 2.2 sec | 2.1 sec |
| Valid answers | 100.00% | 100.00% |
Free with login
Accuracy field by field and the documents where the models differ.
Just your email, no password.
Questions about a document · Czech (150 documents)
Both are equally accurate. Gemma 4 31B is 24.3× cheaper.
| Metric | Claude Sonnet 5 | Gemma 4 31B |
|---|---|---|
| Correct fields | 100.00% | 100.00% |
| Error-free documents | 100.00% | 100.00% |
| Per 1,000 documents | $5.14 | $0.21 |
| To fix / 1,000 | 0 | 0 |
| Speed (median) | 2.6 sec | 1.9 sec |
| Valid answers | 100.00% | 100.00% |
Free with login
Accuracy field by field and the documents where the models differ.
Just your email, no password.
Questions about a document · German (150 documents)
Both are equally accurate. Gemma 4 31B is 30.2× cheaper.
| Metric | Claude Sonnet 5 | Gemma 4 31B |
|---|---|---|
| Correct fields | 100.00% | 100.00% |
| Error-free documents | 100.00% | 100.00% |
| Per 1,000 documents | $5.49 | $0.18 |
| To fix / 1,000 | 0 | 0 |
| Speed (median) | 2.3 sec | 2.1 sec |
| Valid answers | 100.00% | 100.00% |
Free with login
Accuracy field by field and the documents where the models differ.
Just your email, no password.
Questions about a document · Spanish (150 documents)
Both are equally accurate. Gemma 4 31B is 27.2× cheaper.
| Metric | Claude Sonnet 5 | Gemma 4 31B |
|---|---|---|
| Correct fields | 100.00% | 100.00% |
| Error-free documents | 100.00% | 100.00% |
| Per 1,000 documents | $4.94 | $0.18 |
| To fix / 1,000 | 0 | 0 |
| Speed (median) | 2.2 sec | 1.9 sec |
| Valid answers | 100.00% | 100.00% |
Free with login
Accuracy field by field and the documents where the models differ.
Just your email, no password.
Questions about a document · French (150 documents)
Both are equally accurate. Gemma 4 31B is 25.6× cheaper.
| Metric | Claude Sonnet 5 | Gemma 4 31B |
|---|---|---|
| Correct fields | 100.00% | 100.00% |
| Error-free documents | 100.00% | 100.00% |
| Per 1,000 documents | $4.93 | $0.19 |
| To fix / 1,000 | 0 | 0 |
| Speed (median) | 2.1 sec | 2.1 sec |
| Valid answers | 100.00% | 100.00% |
Free with login
Accuracy field by field and the documents where the models differ.
Just your email, no password.