A stata program that calculates federal tax liability and marginal tax rates from nominal taxable income (years 1913 to 2013).

Install taxliab by opening Stata and running the command:

net install taxliab, from(

The documentation for taxliab is included with the installation. To read the documentation, run the command:

help taxliab


The stata command taxsim9 calculates federal and state income tax liability from 21 input variables. The command is indeed very sophisticated, determining, for instance, whether a tax filer is better off itemizing or claiming the standard deduction. However, taxsim9 is less useful for more basic calculations such as estimating tax liability and marginal tax rates given taxable income (rather than gross or adjusted gross income with deductions). Another stata command, taxcalc (available from the NBER by request), calculates tax liability from more basic inputs. However, it is still quite sophisticated in terms of the inputs it receives and, more importantly, is limited to PUF and INSOLE data. You can read the NBER comparison of the commands here. Because taxsim9, taxcalc, or any other stata command cannot perform analyses on the aggregated IRS SOI data on taxable income, we wrote taxliab.

Technical Description

taxliab calculates federal tax liability and marginal tax rates from nominal taxable income (years 1913 to 2013), and requires three input variables: taxable income, year, and filing status. To execute the command, follow three steps. First, rename the variables as follows: (1) taxable income must be named income, (2) year must be named year, and (3) filing status must be named filing_status. Second, recode the variables if necessary as follows: (1) income is the household taxable income in dollar terms (e.g., 50000 for $50,000), (2) year is a four digit number such as 2012, and (3) filing_status is 1 for married filing jointly, 2 for married filing separately, 3 for single, and 4 for head of household. Finally, execute the command by running: taxliab year filing_status income. taxliab returns three variables: the federal tax liability fliab, the marginal tax rate mrate, and the average tax rate arate.