Functions for Google Sheets to calculate income tax and short/long term capital gains tax.
US Federal tax only.
Supports 2020 through 2024 tax years, all filing statuses.
Calculate federal income tax for 2023 on $50,000 of income if you are Married Filing Jointly:
=INCOMETAX(50000, "MFJ", 2023)
Calculate federal short term capital gains tax for 2023 on $40,000 of capital gains if you had $50,000 of regular income and are Married Filing Jointly:
=STCGTAX(50000, 40000, "MFJ", 2023)
Calculate federal long term capital gains for 2023 tax on $40,000 of capital gains if you had $50,000 of regular income and are Married Filing Jointly:
=LTCGTAX(50000, 40000, "MFJ", 2023)
- Make a Google sheet.
- Choose Extensions: Apps Script from the menu.
- Remove the contents of the file (the function called
myFunction
). - Paste the contents of
tax_functions.js
into the file. - Click the 'Save project" button in the toolbar at the top.
- Now they're available for use in the sheet.
To run tests: