Nordburg Tax API

The Nordburg Tax API allows you to get Canadian income tax data estimates in JSON so you can see information about tax brakets, marginal and average tax rates, etc.

Disclaimer

I built this/am building this to learn to make a RESTful API. It is extremely proof-of-concept. I'm not 100% clear on how the Basic Personal Amount works, so that part may be way off. Furthermore, Quebec seems to have unique rules that I don't know. Please do not use for anything important!

Usage

To use this, you need to provide a year (2024 or later), a province code, and a dollar amount. Example: /taxapi/2024/on/40000 will give you information about income taxes in Ontario for $40 000.00 in 2024. The information it gives includes:

  • All tax brackets for Canada
  • All tax brackets for Ontario
  • Ontario Health Premium brackets.
  • Tax paid in each bracket up to the marginal bracket
  • Total tax paid
  • Marginal tax rate
  • Average tax rate
  • Basic Personal Amount
  • The net amount
  • Assuming that the amount provided is the net amount, it calculates what the required gross amount would be.
  • Gross, net, and taxes per paycheque (monthly, twice monthly, bi-weekly/fortnightly, weekly)

See it in action: /taxapi/2024/on/40000.

JSON Output
{...
	"canada": {
		"name":"Canada",
		"bracket":[
			{
				"from":0,
				"rate":0.15,
				"maxTaxPaid":8381.4015,
				"maxTotalTaxPaid":8381.4015,
				"topNet":47494.5985
			},
			{
				"from":55876,
				"rate":0.205,
				"maxTaxPaid":11458.8871,
				"maxTotalTaxPaid":19840.2886,
				"topNet":91932.7115},			
	...
	}
	...
	"on":{
		"name":"Ontario",
		"bracket":[
			{
				"from":0,
				"rate":0.0505,
				"premium" : 0,
				"maxTaxPaid":1010.0005,
				"maxTotalTaxPaid":1010.0005,
				"topNet":19616.149},
			},
			{
				"from":20000,
				"rate":0.1105,
				"premium" : 0,
				"maxTaxPaid":552.5011,
				"maxTotalTaxPaid":1562.5016,
				"topNet":24063.6479},
			},

	...
	}
	"results":{
		"gross":40000,
		"net":34061.8923,
		"premium":450,
		"subtotalTaxPaid":8920.0072,
		"marginalRate":0.2005,
		"averageRate":0.14845,
		"bpaRefund":2981.8995,
		"taxPaid":5938.1077,
		"upe1":40000,
		"upe2":0,
		"paychequeAmounts":{
			"monthly": {
				"gross":3333.3333,
				"net":2838.491,
				"taxPaid":494.8423
			}
			...
		}
		"reverse":{
			"net":40000,
			"gross":47427.2792,
			"taxPaid":7427.2792,
			"upe1":47427.2792,
			"upe2":0,
			"paychequeAmounts":{
				"monthly": {
					"gross":3952.2733,
					"net":3333.3333,
					"taxPaid":618.9399
				}
				...
			}
		}
	}
}			

Province Codes

  1. canada (for just information on Canadian income tax, without provincial data)
  2. nwfl
  3. pei
  4. ns
  5. nb
  6. qc
  7. on
  8. mn
  9. sk
  10. ab
  11. bc
  12. nwt
  13. nu
  14. yk