A Stata Interface to TAXSIM for calculating US and State Income Tax Liabilities

taxsimtest.ado is a Stata program for calculating US and State income tax liabilities from user supplied data. It does not do the calculation in Stata, or on the user's computer. Rather, it packages up the data and sends it to the taxsim server at the NBER office in Cambridge for processing, then loads the results into a Stata format dataset on the user's computer. The process is fast enough to be interactive for modest sized datasets, and will work for large files also. The program takes into account up to 31 income, deduction and personal characteristics in the calculation of taxes.

Install and Test

First, be very familiar with Internet Taxsim before using the Stata interface. Install taxsimtest.ado with these Stata commands:

. net from "https://taxsim.nber.org/stata" . net describe taxsimtest . net install taxsimtest Be sure to read the instructions: .help taxsimtest will show the help file. After reading that carefully, run a small test: set obs 1 gen year=1970 gen mstat=2 gen ltcg=100000 taxsimtest,replace list and confirm that fiitax is 16700.04.

-taxsimtest.ado- uses the ssh protocol for communicating with our server. It will try ports 80 and 443 if 22 is blocked. If ssh is not available on your computer (such as Windows versions before Autum 2019) or blocked by a firewall, it is possible that the "ftp" option will help. There is also an "http" option but that may not work with large files.

Release Notes

-taxsimtest- is compatible with taxsim27,taxsim32 and taxsim35 input files, but adds variables for the TCJA business tax deduction, the 2020 recovery rebate credit, the FICA adjustment for self-employment income and is more likely to avoid firewall issues. There are 9 new variables ag1..age9 for the ages of up to 9 dependents and 2 new variables for self-employment income. Taxsim will determine how many are eligible for EIC, CTC and CC credits. The variables for the number of dependents of various ages documented for ealier versions of taxsim are still respected for users with existing code. The change was made in response to the frequency of congress changing age thresholds.

There is also available taxsimlocaltest.ado that runs locally on your computer. It is especially useful for very large datasets (millions of records) or highly confidential data.

Daniel Feenberg
617-863-0343
feenberg@nber.org


Last update 7 Nov 2025 by drf