# Tax brackets visualizations

## Introduction

Many countries have a progressive income tax system where the more you earn, the higher percentage tax you pay. This is typically accomplished via tax brackets, which is a sequence of dollar amounts and tax rates: Your first $`x` of income is taxed at `a`%, then your next $`y` of income (if any) is taxed at `b`%, then your next $`z` of income (if any) is taxed at `c`%, et cetera.

Despite many people having strong opinions about tax regulations – especially to lower taxes on themselves and raise taxes on the rich – most don’t know how tax brackets work. Given an arbitrary gross income number and a description of the applicable tax brackets, most people can’t calculate the amount of tax owed, nor calculate an average tax rate, nor graph the relationship between gross income and net income.

Due to the mass ignorance of tax brackets, misconceptions arise such as, “If I receive a raise and it bumps me into the next tax bracket, I’ll take home less money than before”. Likewise, whenever I hear a claim like “the rich aren’t paying their fair share”, I don’t take them seriously until that person can at least demonstrate basic skills in calculating with tax brackets.

Tax brackets are most commonly explained using words (prose), tables of numbers, graphs, and videos. I think my interactive visualizations here are more helpful in understanding tax brackets because you can control the gross income and see how it gets divided up into brackets and taxed at different rates. In particular, you can see that as income increases, the tax dollar amount for lower-level brackets eventually stop changing.

## Table visualization

Gross income: $

Start | Size | End | Rate | Gross | Tax | Net |
---|---|---|---|---|---|---|

Overall |

Explanations:

Start column: The starting dollar amount of this bracket. (Public)

Size column: The dollar size or width of this bracket. (Public)

End column: The ending dollar amount of this bracket. (Public)

Rate column: The tax rate percentage applied to this bracket. (Public)

Gross column: The gross income dollar amount (not larger than size) in this bracket. (Personal)

Tax column: The income tax dollar amount (gross × rate) in this bracket. (Personal)

Net column: The net income dollar amount (gross − tax) in this bracket. (Personal)

Overall rate cell: The average tax rate percentage, which equals overall tax ÷ overall gross income. (Personal)

Overall gross cell: The total gross income dollar amount among all brackets, which also equals the input number. (Personal)

Overall tax cell: The total income tax dollar amount among all brackets. (Personal)

Overall net cell: The total net income dollar amount among all brackets, which also equals overall gross − overall tax. (Personal)

Marginal tax rate: The tax rate percentage cell in the bottommost table row (excluding the “Overall” row) where the gross/

tax/ net cells are non-zero. (Personal)

## Chart visualization

Gross income: $

Net income: $

Income tax: $

The horizontal axis shows gross income, where the left side is zero and increases rightward. The vertical axis shows the proportion of gross income that goes toward income tax and net income.

## Configuration

Each line has the format “‹bracket size›, ‹tax rate›”, where the bracket size is a bare number without the dollar sign, and the tax rate is a decimal fraction (e.g. 0.123 means 12.3%). Leading and trailing whitespace are ignored. The default example is the Canadian federal tax rates for the year . The source code is available for viewing.

Mathematically speaking, regardless of how the tax brackets are set up, the function from gross income to net income is continuous and piecewise-linear. The derivative of this function is the marginal tax rate, which is piecewise-constant with a potential discontinuity at the endpoints of every tax bracket.