it may be too soon to be preparing next year’s federal return! i just wish to share this method for computing your base tax for 2022 using the marginal tax rate table from IRS.
the worksheet below illustrates how the tax is computed for a single filer (there are separate tables for married filing jointly, or separately, etc). who’s earning $120000 a year.
it shows that the income would fall on the 24% tax bracket (aka marginal rate). the total tax is computed as the sum of the taxes from the taxable portion of the income at each tax bracket. so even if you are initially put at a tax bracket, your effective rate (tax / income) is usually a little lower.
the table structure is the same for other filing status codes.
who knows, maybe if you add more code to handle deductions, etc. you may come up with a generic tax calculator like https://taxsim.app
link for remixing:
https://x.thunkable.com/copy/19eff6f689f9a00ce407500852265d18