Interest calculator CLI
an agent harness with tools and a workspace
Suite v5 (version 5.0) · 44 scored tasks · cut 2026-11-19· What changed
What it asks
Build a command-line compound-interest calculator in Python 3, standard library only (no third-party packages). Work in the current directory: the package goes in interest/ and the tool runs from this directory as `python -m interest`.
Flags
- --principal AMOUNT (required): the starting balance, zero or more.
- --rate PERCENT (required): the annual interest rate in percent, so 5 means 5%. Zero or more.
- --years N or --months N: the time, a positive whole number. Give exactly one of them.
- --compound {annually,quarterly,monthly,daily} (required): 1, 4, 12 or 365 compounding periods a year.
- --contribution AMOUNT and --contribution-frequency {monthly,annually} (optional, but given together): that amount, greater than zero, is added at the end of every month or every year.
- --json: print JSON instead of the summary.
Interest is credited at the end of each compounding period (the annual rate divided by the periods a year, applied to the balance at that moment). A contribution is added at the end of its period, after any interest credited at that same moment.
Output
- By default, print a readable summary showing the principal, total contributions, interest earned and final balance.
- With --json, print one JSON object and nothing else: {"principal": ..., "total_contributions": ..., "interest_earned": ..., "final_balance": ...}, each a number rounded to cents.
Errors
- Invalid, negative or contradictory input (a value that is not a number, a negative amount, both --years and --months or neither, a contribution without a frequency or the reverse, an unknown compounding or frequency) exits with a non-zero status and a short message on stderr, not a traceback.
Tests and docs
- Write automated tests in tests/ (pytest or unittest) covering ordinary cases, zero interest, monthly compounding, recurring contributions at both frequencies, invalid input and a known expected-value case. They must pass when run from this directory.
- Write README.md with how to run the tool and command examples. How it's scored
Test groups
- Compound-interest math
- Output
- Input validation
- Own tests
- README
Scored 38 tests in total, scaled to 10, by hidden tests.
Which checks trip models up
Share of the 58 setups’ newest counted runs that passed each check, hardest first. A part-credit check counts the share it earned.
Score spread
One dot per setup, at its mean score. Dots at the same score stack. Select a dot for its run.
Local Cloud
Show the scores as a table
Best performers
Each model's best setup (the one the leaderboard ranks it by, on its Overall score), ranked by score on this task, then time. Check squares are from the setup's newest counted run. Select a run ID to open that run.
| # | Maker | Model | Setup | Score | Compound-interest math | Output | Input validation | Own tests | README | Time | Tokens out | Cost |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Qwen | qwen3.8-27b | cloud pi openrouter | 10.0 | ✓ | ✓ | ✓ | ✓ | ✓ | 51s | 19k | $0.276 |
| 2 | DeepSeek | deepseek-v4.1-flash | cloud pi openrouter | 10.0 | ✓ | ✓ | ✓ | ✓ | ✓ | 51s | 11k | $0.015 |
| 3 | OpenAI | gpt-6.1-sol | cloud pi openrouter | 10.0 | ✓ | ✓ | ✓ | ✓ | ✓ | 1m 02s | 4.3k | $0.090 |
| 4 | OpenAI | gpt-6-luna | cloud pi openrouter | 10.0 | ✓ | ✓ | ✓ | ✓ | ✓ | 1m 09s | 6.0k | $0.0071 |
| 5 | Anthropic | claude-opus-5.5 | cloud pi openrouter | 10.0 | ✓ | ✓ | ✓ | ✓ | ✓ | 1m 30s | 11k | $0.778 |
| 6 | Z.ai (OpenRouter) | glm-5.3-flash | cloud pi openrouter | 10.0 | ✓ | ✓ | ✓ | ✓ | ✓ | 2m 35s | 13k | $0.577 |
| 7 | Qwen | qwen3.8-27b | local 4bit · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse) | 10.0 | ✓ | ✓ | ✓ | ✓ | ✓ | 5m 49s | 17k | ≈$0.0011 |
| 8 | Moonshot AI | kimi-k2.6 | cloud pi openrouter | 10.0 | ✓ | ✓ | ✓ | ✓ | ✓ | 8m 38s | 42k | $2.55 |
| 9 | DeepSeek | deepseek-v4-flash | cloud pi openrouter | 10.0 | ✓ | ✓ | ✓ | ✓ | ✓ | 14m 18s | 51k | $0.107 |
| 10 | gemma-4-31b | local 4bit · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse) | 10.0 | ✓ | ✓ | ✓ | ✓ | ✓ | 15m 01s | 11k | ≈$0.0027 | |
| 11 | Poolside | laguna-xs-2.1 | local q4_k_m · reasoning on · pi Apple M1 Pro, 32 GB (Ironwood) | 10.0 | ✓ | ✓ | ✓ | ✓ | ✓ | 15m 01s | 17k | ≈$0.0018 |
| 12 | thinkingmachines | thinkingmachines/inkling-2-mini | local q4_k_m · reasoning low · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse) | 9.7 | ✓ | ✓ | ✓ | ✓ | ✕ | 15m 00s | 24k | ≈$0.0027 |
| 13 | Unknown | nvidia-nemotron-3.5-lightning-30b-a3b | local q4_k_m · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse) | 9.7 | ✓ | ✓ | ✓ | ✕ | ✓ | 15m 01s | 22k | ≈$0.0027 |
| 14 | gemma-4-26b-a4b-qat | local q4_0 · reasoning on · pi AMD Ryzen 7 7700, NVIDIA RTX 5070 Ti 16 GB, 32 GB (Whitehall) | 9.5 | ✓ | ✓ | ✓ | ✕ | ✕ | 15m 01s | 24k | ≈$0.016 | |
| 15 | NVIDIA | nemotron-3-nano-omni | local q4_k_m · reasoning off · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse) | 9.2 | ✓ | ~ | ~ | ✕ | ✓ | 15m 01s | 34k | ≈$0.0027 |
| 16 | OpenAI | gpt-oss-20b | local mxfp4 · reasoning high · pi Apple M1 Pro, 32 GB (Ironwood) | 4.0 | ~ | ~ | ✓ | ✕ | ✓ | 4m 07s | 5.7k | ≈$0.00050 |
| 17 | Qwen | qwen3.6-35b-a3b | local 6bit · reasoning off · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse) | 4.0 | ~ | ~ | ✓ | ✓ | ✓ | 5m 21s | 18k | ≈$0.00098 |
| 18 | Qwen | qwen3-coder-30b | local 4bit · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse) | 4.0 | ~ | ~ | ~ | ✓ | ✓ | 10m 09s | 15k | ≈$0.0019 |
| 19 | Mistral AI | mistralai/devstral-small-2-2512 | local q4_k_m · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse) | 4.0 | ~ | ✓ | ✓ | ✓ | ✓ | 12m 41s | 9.0k | ≈$0.0023 |
| 20 | Qwen | qwen3.5-35b-a3b | local quant not recorded · reasoning on · pi Apple M1 Pro, 32 GB (Ironwood) | 4.0 | ~ | ~ | ✓ | ✓ | ✓ | 13m 17s | 14k | ≈$0.0016 |
| 21 | Prism ML | bonsai-27b | local 2bit · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse) | 4.0 | ~ | ~ | ~ | ✕ | ✓ | 15m 00s | 21k | ≈$0.0027 |
| 22 | Ornith AI | ornith-1.5-9b | local q4_k_m · reasoning on · pi Apple M1 Pro, 32 GB (Ironwood) | 4.0 | ~ | ✓ | ✓ | ✕ | ✕ | 15m 01s | 16k | ≈$0.0018 |
| 23 | Qwen | qwen3.5-9b | local 4bit · reasoning off · pi Apple M1 Pro, 32 GB (Ironwood) | 4.0 | ~ | ~ | ~ | ✕ | ✕ | 15m 01s | 20k | ≈$0.0018 |
| 24 | NVIDIA | nemotron-3-nano-omni | local q4_k_m · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse) | 3.1×3 | ✓ | ~ | ~ | ✕ | ✓ | 5m 07s | 15k | ≈$0.00093 |
| 25 | gemma-4-e4b | local 4bit · reasoning on · pi Apple M1 Pro, 32 GB (Ironwood) | 0.3 | ~ | ✕ | ✕ | ✕ | ✕ | 15m 01s | 6.9k | ≈$0.0018 | |
| 26 | Mistral AI | ministral-3-14b-reasoning | local q4_k_m · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse) | 0.3 | ✕ | ✕ | ✕ | ✕ | ✓ | 15m 01s | 19k | ≈$0.0027 |
| 27 | NVIDIA | nemotron-3-nano-4b | local q4_k_m · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse) | 0.1×2 | ✕ | ✕ | ✕ | ✕ | ✕ | 3m 13s | 19k | ≈$0.00059 |
| 28 | Z.ai (Hugging Face) | glm-4.7-flash | local 6bit · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse) | 0.0 | ✕ | ✕ | ✕ | ✕ | ✕ | 0.8s | 0 | ≈<$0.0001 |
| 29 | Qwen | qwen2.5-0.5b-instruct | local q8_0 · pi Apple M1 Pro, 32 GB (Ironwood) | 0.0 | ✕ | ✕ | ✕ | ✕ | ✕ | 4.4s | 304 | ≈<$0.0001 |
| 30 | Anthropic | claude-sonnet-5.5 | cloud pi openrouter | 0.0 | ✕ | ✕ | ✕ | ✕ | ✕ | 9.3s | 0 | $0 |
| 31 | Allen Institute for AI | allenai/olmocr-2-7b | local q4_k_m · opencode Apple M5 Pro, 48 GB (Duskfall, Eclipse) | 0.0 | ✕ | ✕ | ✕ | ✕ | ✕ | 11s | 464 | ≈<$0.0001 |
| 32 | gemma-4-26b-a4b | local quant not recorded · reasoning off · pi Apple M1 Pro, 32 GB (Ironwood) | 0.0 | ✕ | ✕ | ✕ | ✕ | ✕ | 16s | 0 | ≈<$0.0001 | |
| 33 | OpenAI | gpt-oss-20b | local mxfp4 · reasoning low · opencode Apple M1 Pro, 32 GB (Ironwood) | 0.0 | ✕ | ✕ | ✕ | ✕ | ✕ | 29s | 631 | ≈<$0.0001 |
| 34 | Liquid AI | lfm2-24b-a2b | local 6bit · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse) | 0.0 | ✕ | ✕ | ✕ | ✕ | ✕ | 33s | 3.1k | ≈$0.00010 |
| 35 | OpenAI | gpt-oss-20b | local mxfp4 · reasoning medium · pi Apple M1 Pro, 32 GB (Ironwood) | 0.0 | ✕ | ✕ | ✕ | ✕ | ✕ | 1m 09s | 2.2k | ≈$0.00014 |
| 36 | Qwen | qwen3.6-35b-a3b | local 6bit · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse) | 0.0 | ✕ | ✕ | ✕ | ✕ | ✕ | 4m 12s | 17k | ≈$0.00077 |
| 37 | Recursive | flint | local q4_k_m · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse) | 0.0 | ✕ | ✕ | ✕ | ✕ | ✕ | 5m 22s | 17k | ≈$0.00098 |
| 38 | Qwen | qwen3.8-27b | local q3_k_s · reasoning high · pi AMD Ryzen 7 7700, NVIDIA RTX 5070 Ti 16 GB, 32 GB (Whitehall) | 0.0 | ✕ | ✕ | ✕ | ✕ | ✕ | 5m 48s | 16k | ≈$0.0062 |
| 39 | thinkingmachines | thinkingmachines/inkling-2-mini | local q4_k_m · reasoning high · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse) | 0.0×2 | ✕ | ✕ | ✕ | ✕ | ✕ | 9m 26s | 17k | ≈$0.0017 |
| 40 | Unknown | granite-4.2-3b | local q4_k_m · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse) | 0.0 | ✕ | ✕ | ✕ | ✕ | ✕ | 15m 00s | 34k | ≈$0.0027 |
| 41 | Qwen | qwen3.8-27b | local 4bit · reasoning xhigh · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse) | 0.0 | ✕ | ✕ | ✕ | ✕ | ✕ | 15m 01s | — | ≈$0.0027 |
| 42 | Allen Institute for AI | olmo-3-32b-think | local 4bit · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse) | 0.0 | ✕ | ✕ | ✕ | ✕ | ✕ | 15m 01s | — | ≈$0.0027 |
| 43 | Ornith AI | ornith-1.5-35b-a3b | local q4_k_s · reasoning on · pi Apple M1 Pro, 32 GB (Ironwood) | 0.0 | ✕ | ✕ | ✕ | ✕ | ✕ | 15m 01s | 6.6k | ≈$0.0018 |
| 44 | Qwen | qwen3.5-9b | local 4bit · reasoning on · pi Apple M1 Pro, 32 GB (Ironwood) | 0.0 | ✕ | ✕ | ✕ | ✕ | ✕ | 18m 10s | 13k | ≈$0.0022 |
- Qwencloud pi openrouterScore 10.0✓✓✓✓✓Time 51sTokens out 19kCost $0.276
- DeepSeekcloud pi openrouterScore 10.0✓✓✓✓✓Time 51sTokens out 11kCost $0.015
- OpenAIcloud pi openrouterScore 10.0✓✓✓✓✓Time 1m 02sTokens out 4.3kCost $0.090
- OpenAIcloud pi openrouterScore 10.0✓✓✓✓✓Time 1m 09sTokens out 6.0kCost $0.0071
- Anthropiccloud pi openrouterScore 10.0✓✓✓✓✓Time 1m 30sTokens out 11kCost $0.778
- Z.ai (OpenRouter)cloud pi openrouterScore 10.0✓✓✓✓✓Time 2m 35sTokens out 13kCost $0.577
- Qwenlocal 4bit · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse)Score 10.0✓✓✓✓✓Time 5m 49sTokens out 17kCost ≈$0.0011
- Moonshot AIcloud pi openrouterScore 10.0✓✓✓✓✓Time 8m 38sTokens out 42kCost $2.55
- DeepSeekcloud pi openrouterScore 10.0✓✓✓✓✓Time 14m 18sTokens out 51kCost $0.107
- Googlelocal 4bit · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse)Score 10.0✓✓✓✓✓Time 15m 01sTokens out 11kCost ≈$0.0027
- Poolsidelocal q4_k_m · reasoning on · pi Apple M1 Pro, 32 GB (Ironwood)Score 10.0✓✓✓✓✓Time 15m 01sTokens out 17kCost ≈$0.0018
- thinkingmachineslocal q4_k_m · reasoning low · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse)Score 9.7✓✓✓✓✕Time 15m 00sTokens out 24kCost ≈$0.0027
- Unknownlocal q4_k_m · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse)Score 9.7✓✓✓✕✓Time 15m 01sTokens out 22kCost ≈$0.0027
- Googlelocal q4_0 · reasoning on · pi AMD Ryzen 7 7700, NVIDIA RTX 5070 Ti 16 GB, 32 GB (Whitehall)Score 9.5✓✓✓✕✕Time 15m 01sTokens out 24kCost ≈$0.016
- NVIDIAlocal q4_k_m · reasoning off · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse)Score 9.2✓~~✕✓Time 15m 01sTokens out 34kCost ≈$0.0027
- OpenAIlocal mxfp4 · reasoning high · pi Apple M1 Pro, 32 GB (Ironwood)Score 4.0~~✓✕✓Time 4m 07sTokens out 5.7kCost ≈$0.00050
- Qwenlocal 6bit · reasoning off · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse)Score 4.0~~✓✓✓Time 5m 21sTokens out 18kCost ≈$0.00098
- Qwenlocal 4bit · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse)Score 4.0~~~✓✓Time 10m 09sTokens out 15kCost ≈$0.0019
- Mistral AIlocal q4_k_m · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse)Score 4.0~✓✓✓✓Time 12m 41sTokens out 9.0kCost ≈$0.0023
- Qwenlocal quant not recorded · reasoning on · pi Apple M1 Pro, 32 GB (Ironwood)Score 4.0~~✓✓✓Time 13m 17sTokens out 14kCost ≈$0.0016
- Prism MLlocal 2bit · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse)Score 4.0~~~✕✓Time 15m 00sTokens out 21kCost ≈$0.0027
- Ornith AIlocal q4_k_m · reasoning on · pi Apple M1 Pro, 32 GB (Ironwood)Score 4.0~✓✓✕✕Time 15m 01sTokens out 16kCost ≈$0.0018
- Qwenlocal 4bit · reasoning off · pi Apple M1 Pro, 32 GB (Ironwood)Score 4.0~~~✕✕Time 15m 01sTokens out 20kCost ≈$0.0018
- NVIDIAlocal q4_k_m · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse)Score 3.1×3 runs✓~~✕✓Time 5m 07sTokens out 15kCost ≈$0.00093
- Googlelocal 4bit · reasoning on · pi Apple M1 Pro, 32 GB (Ironwood)Score 0.3~✕✕✕✕Time 15m 01sTokens out 6.9kCost ≈$0.0018
- Mistral AIlocal q4_k_m · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse)Score 0.3✕✕✕✕✓Time 15m 01sTokens out 19kCost ≈$0.0027
- NVIDIAlocal q4_k_m · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse)Score 0.1×2 runs✕✕✕✕✕Time 3m 13sTokens out 19kCost ≈$0.00059
- Z.ai (Hugging Face)local 6bit · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse)Score 0.0✕✕✕✕✕Time 0.8sTokens out 0Cost ≈<$0.0001
- Qwenlocal q8_0 · pi Apple M1 Pro, 32 GB (Ironwood)Score 0.0✕✕✕✕✕Time 4.4sTokens out 304Cost ≈<$0.0001
- Anthropiccloud pi openrouterScore 0.0✕✕✕✕✕Time 9.3sTokens out 0Cost $0
- Allen Institute for AIlocal q4_k_m · opencode Apple M5 Pro, 48 GB (Duskfall, Eclipse)Score 0.0✕✕✕✕✕Time 11sTokens out 464Cost ≈<$0.0001
- Googlelocal quant not recorded · reasoning off · pi Apple M1 Pro, 32 GB (Ironwood)Score 0.0✕✕✕✕✕Time 16sTokens out 0Cost ≈<$0.0001
- OpenAIlocal mxfp4 · reasoning low · opencode Apple M1 Pro, 32 GB (Ironwood)Score 0.0✕✕✕✕✕Time 29sTokens out 631Cost ≈<$0.0001
- Liquid AIlocal 6bit · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse)Score 0.0✕✕✕✕✕Time 33sTokens out 3.1kCost ≈$0.00010
- OpenAIlocal mxfp4 · reasoning medium · pi Apple M1 Pro, 32 GB (Ironwood)Score 0.0✕✕✕✕✕Time 1m 09sTokens out 2.2kCost ≈$0.00014
- Qwenlocal 6bit · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse)Score 0.0✕✕✕✕✕Time 4m 12sTokens out 17kCost ≈$0.00077
- Recursivelocal q4_k_m · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse)Score 0.0✕✕✕✕✕Time 5m 22sTokens out 17kCost ≈$0.00098
- Qwenlocal q3_k_s · reasoning high · pi AMD Ryzen 7 7700, NVIDIA RTX 5070 Ti 16 GB, 32 GB (Whitehall)Score 0.0✕✕✕✕✕Time 5m 48sTokens out 16kCost ≈$0.0062
- thinkingmachineslocal q4_k_m · reasoning high · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse)Score 0.0×2 runs✕✕✕✕✕Time 9m 26sTokens out 17kCost ≈$0.0017
- Unknownlocal q4_k_m · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse)Score 0.0✕✕✕✕✕Time 15m 00sTokens out 34kCost ≈$0.0027
- Qwenlocal 4bit · reasoning xhigh · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse)Score 0.0✕✕✕✕✕Time 15m 01sTokens out —Cost ≈$0.0027
- Allen Institute for AIlocal 4bit · reasoning on · pi Apple M5 Pro, 48 GB (Duskfall, Eclipse)Score 0.0✕✕✕✕✕Time 15m 01sTokens out —Cost ≈$0.0027
- Ornith AIlocal q4_k_s · reasoning on · pi Apple M1 Pro, 32 GB (Ironwood)Score 0.0✕✕✕✕✕Time 15m 01sTokens out 6.6kCost ≈$0.0018
- Qwenlocal 4bit · reasoning on · pi Apple M1 Pro, 32 GB (Ironwood)Score 0.0✕✕✕✕✕Time 18m 10sTokens out 13kCost ≈$0.0022
Score against effort
Score against median time per run, log scale. Up and to the left is better. Each dot is a setup; the best setup of each model is named. Times and costs are from different machines and providers, so read them as each setup's own, not as a like-for-like speed test.
Local Cloud
Show the points as a table
Harness comparison
The same task through each agent harness this suite scores for it.
| Harness | Setups | Mean score | Best score | Median time |
|---|---|---|---|---|
| opencode | 8 | 4.1 | 9.7 | 11m 58s |
| pi | 50 | 4.2 | 10.0 | 9m 20s |
- opencodeSetups 8Mean score 4.1Best score 9.7Median time 11m 58s
- piSetups 50Mean score 4.2Best score 10.0Median time 9m 20s
Same setup, different harness
opencodepi
Show the scores as a table
| Setup | Harness scores |
|---|---|
| qwen3.8-27b (reasoning on) | opencode 9.5 · pi 10.0 |
| nemotron-3-nano-omni (reasoning on) | opencode 9.7 · pi 3.1 |
| qwen3.6-35b-a3b (reasoning on) · 6bit m5-pro-48gb | opencode 9.7 · pi 0.0 |
| flint (reasoning on) | opencode 4.0 · pi 0.0 |
| qwen3.6-35b-a3b (reasoning on) · q4_k_m rtx-5070-ti-16gb | opencode 0.0 · pi 4.0 |
| allenai/olmocr-2-7b | opencode 0.0 · pi 0.0 |
| thinkingmachines/inkling-2-mini (reasoning high) | opencode 0.0 · pi 0.0 |