Tax Simulation DIY

Hi
I intent to simulate my taxes, e.g. calculate what taxes I own when the next bill comes.
I could just use some online calculator like from comparis. However my “dream solution” would be a complete re-engineering of the tax calculation (in my case canton/city of Zurich), so I can implement it as (python) script on my bookkeeping.

Has anyone build something like this that i could use/ get inspired from?

My ideas & challanges are

  • obtain taxation rates (solved: for ZH available as pdf here). bonus: find a machine readable source that updates in case the numbers change
  • find out about all the individual calculation steps by reverse engineering my last tax declaration and some common sense
    • gross income & deductions
    • DA-1 calculation. I felt some shenanegans going on here last time. I honestly did not understand the calculation they put down to estimate my tax credit (which end much less than what I paid in the end)
    • wealth tax calculation (should be easy)
    • what is this personalsteuer of CHF 24???
  • for a given tax declaration, calculate the derivative of the taxes owed w.r.t. certain parameters

bonus question: has anyone had good experience with a Steuerberater in Zurich? I might be interested to get some consultation. mostly for education purpose.

I have made a Python script to systematically calculate financial advantages or disadvantages if I move to another town and/or canton.

Taxation rates can be downloaded as CSV files from the federal tax office, see the link below. The script imports them. Then I’ve made an XML file with all my personal parameters, which is read and processed. The script then produces a CSV with, among other things, the expected taxes for all towns in the new canton. It also calculates how more or less expensive the rent should be to keep costs flat.

I can give it to you, if you want.

If you use it I would appreciate if you shared with me what you make of it. Also, I am not a professional developer, so I don’t know how properly pythonic my code is. And of course, there might be bugs in there, although I checked some numbers against official tax office calculators and they seemed right.

https://swisstaxcalculator.estv.admin.ch/#/taxdata/tax-rates

1 Like

I simply take the tax software for the current year and update the number.

Do not forget that you have to take into account many parameters other than tax rates. Depending on your situation (travel deductions, social deductions, health deductions, etc.) this could vary a lot.

Why not using the online tax calculator that all cantons have now online?

They will provide you with accurate figures.

I personally use the tax software of the previous year to calculate my pre payments/taxes for next year.

Unless there are big changes at the canton level, it will give you precise figures. Easy to play with numbers to run simulations.

1 Like

because this does not integrate with my (python based) bookkeeping.

My goal is not to get a rough estimate of my due taxes. This i indeed get from any online calculator.
I want an automated update of my due taxes as I enter more transactions to my bookkeeping :slight_smile:

…and some extended analytics that require me to have full control on the calculation. like analysis & visualisation

Because it is not The Way of the Nerd.

It’s simply fun. I didn’t have to write a script for that, but I was learning Python and that was a welcome use case.

5 Likes

Do you have sub-categories allowing to choose between “tax deductible” vs “non tax deductible” in your bookkeeping system ?

For example, let’s say you buy books. Professional books in relation with your job might be deductible while comics are not.

How will you manage tax deductions when they are lower that what you effectively paid ?

Zurich allows an annual deduction of CHF 2600 for single, CHF 1700 at federal level for health insurance premiums. What if you pay CHF 350/month ?

that would be utmost simple logic to include, however i am not that far yet :slight_smile:
i could imagine writing a beancount plugin that lets you whitelist accounts that are tax-deductable, and also maximum amounts etc…

By reading and partipating to this forum, you confirm you have read and agree with the disclaimer presented on http://www.mustachianpost.com/
En lisant et participant à ce forum, vous confirmez avoir lu et être d'accord avec l'avis de dégagement de responsabilité présenté sur http://www.mustachianpost.com/fr/