Skip to content
TYFSADIKPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TaxGlobe

A Canadian income tax calculator for every province and territory, 2023 tax year. It runs entirely in the browser: no server, no build step, no dependencies.

Features

  • Federal plus provincial or territorial tax for all 13 jurisdictions.
  • Basic personal amount credits, including the federal phase-out between $165,430 and $235,675 (Yukon follows it).
  • Ontario surtax and Ontario Health Premium, Prince Edward Island surtax, and the 16.5% Quebec federal abatement.
  • A step-by-step "how the total is built" table and collapsible per-bracket tables.
  • Average (effective) rate, colour coded, and the rate on your next dollar (marginal rate).
  • Side-by-side comparison of two provinces at the same income.
  • Results update as you type (150 ms debounce) and the URL is shareable, for example ?income=85000&prov=ON&vs=AB.

Not included

CPP/QPP, EI/QPIP and their credits; other credits and deductions such as RRSP, tuition, dependants, the Canada employment amount and provincial low-income reductions. The number entered is treated as taxable income. This is a learning tool, not tax advice.

Run it

npx serve .        # or: python3 -m http.server

Open the printed address. The JavaScript uses ES modules, so open it through a local server rather than straight from the file system.

Test it

node --test test/

The tests check the bracket engine, bracket edges, the BPA phase-out, a worked Ontario example, the published thresholds where the Ontario and PEI surtaxes start, the Ontario Health Premium tiers, and the published 2023 top combined marginal rate for all 13 jurisdictions.

Structure

File Role
js/taxData.js 2023 brackets and credit amounts, one object per jurisdiction
js/calc.js Pure tax engine, no DOM access
js/app.js Form handling and rendering (textContent only)
test/calc.test.js Node test runner suite

Data sources

  • Canada Revenue Agency, tax rates and income brackets for all years (2023).
  • Revenu Quebec, 2023 tax rates (TP-1.D.GR-V).
  • 2023 basic personal amounts, federal line 30000 and provincial line 58040.

To update the year, edit js/taxData.js only and update the test expectations.

Licence

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages