as the title mentions, this is an estimator so i might as well spell out the disclaimer up front. "Disclaimer: The Federal Income Tax Estimator is a simplified tool designed to provide an estimate of your federal income tax liability. It is not intended to replace official IRS guidance or professional tax advice. This tool is for general informational purposes only and should not be relied upon for complex tax situations or as a substitute for consulting the IRS or a qualified tax professional. For accurate and authoritative information, please visit the official IRS website (irs.gov) or consult with a qualified tax expert. Estimates provided by this tool are approximate and may not reflect your actual tax liability."
anyway, the process is straightforward as shown by the screenshot below.
in fact i made this screenshot to accompany the part in the IRS website that illustrates graphically (compactly and accurately) how tax brackets are used.
the example reflects a taxpayer filing as Single with a taxable income of $58000. (Actually the gross income is $72600, which comes with a standard deduction of $14600)
i had already created a much simpler estimator in 2022 (link). which had the tax brackets encoded in a hardcoded dictionary and it computed the tax in the same way.
in this version i had used json to define the data with the possibility of adding more entries as new tax brackets are defined for future years. i also allowed for the automatic computation of standard deduction but it can be overriden with a toggle selector accompanied by a manually entered itemizde deduction amount.
i also included (for standard deduction processing) the special handling of those who are 65 years old or over and those who are legally blind. these cases are given additional standard deductions.
here's a segment of the json:
i also added an optional entry for taxes withheld (from wages) to compute tax owed more realistically.
of course, there are many cases that this program cannot handle - like married couples who are both over 65 and/or blind, dependents ,qualififed widow(er) status, etc. - for these and othere cases, please consult the IRS or a tax preparer.
here is the aia
fedtaxest.aia (11.3 KB)
and copy of all blocks downloaded as an image (it may be too big?):