Skip to content

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Zero-Based Budget

Give every dollar a job. Live 'left to assign' meter that hits exactly zero.

Live demo: essa-shakeel.github.io/zero-based-budget/

Zero-Based Budget screenshot

tests license: MIT dependencies: 0

Tool #1 of Finance 100: 100 free, open-source money tools by Essa Shakeel. Category: Budgeting & Cash Flow.

Features

  • Compares your monthly take-home pay with every budget line
  • Shows left to assign, turning green only at exactly zero
  • Editable category list with Canadian starter amounts for rent, groceries, car, hydro and TFSA
  • Share of income for each line and a donut chart of the split
  • Saves your numbers in your browser and exports to CSV

How it works

Left to assign is income - sum of lines. Each line's share is amount / income. The meter is green only when the difference is zero to the cent, amber when money is left over, and red when the lines exceed income.

The full method, assumptions and limits are on the page under How it works.

Run it locally

No build step and no dependencies. It is plain HTML, CSS and JavaScript modules.

git clone https://github.com/Essa-Shakeel/zero-based-budget.git
cd zero-based-budget
npx serve .            # or: python -m http.server 8000

Then open the URL it prints. Browsers block JavaScript modules on file://, so you need a local server rather than double-clicking index.html.

Tests

node --test "test/*.test.mjs"

All the math lives in js/calc.js as pure functions with unit tests in test/. js/app.js connects them to the page, and GitHub Actions runs the tests on every push.

index.html        page and inputs
js/calc.js        the finance math (pure, tested)
js/app.js         UI wiring
js/fin.js         shared finance helpers (PMT, NPV, IRR, ...)
js/ui.js          formatting, forms, CSV, local storage
js/chart.js       tiny canvas charts, no libraries
test/             node:test unit tests

Privacy

Everything runs in your browser. No accounts, no tracking, no server: nothing you type leaves your device.

Disclaimer

This is an educational tool, not financial, tax, legal or investment advice. Check the results against official sources or a qualified professional before you make decisions.

Contributing

Issues and pull requests are welcome. Keep the zero-dependency approach and add a test for any change to js/calc.js.

License

MIT © 2026 Essa Shakeel

Releases

Packages

Contributors

Languages