October 22, 2019

Initial problem: High tax on consultants in Sweden

Viktor Ferenczi @FViktor

As with many other startups it all started with having a problem myself.

Back in 2017 I was lucky enough to get a great consulting opportunity because of a massive layoff. Being a consultant involves sending monthly invoices, so I created a small company (AB: aktiebolag) here in Sweden. I hired an accountant and started working hard. Revenue began to arrive at a steady rate.

As in most other countries the revenue of my company does not translate directly to net income. After a few emails with my accountant I had to realize how complex the Swedish tax rules are and how seriously they impact the net income I can achieve from my business.

It turned out that my biggest cost is the tax by far. Consultants have to pay both the income tax as an employee and the payroll tax as an employer. There is no family taxation, income tax is calculated individually. Dividend rules are complex and there is profit tax on all revenue not spent by the end of the financial year.

It turned out accountants have the software for the "forward" tax calculation, but cannot tell how to wisely choose the numbers we still have control over. Widespread practice is to just set an arbitrary salary and accept the tax hit later.

"Only Skatteverket knows the final tax to pay."

(Skatteverket is the tax office in Sweden.)

I did not accept this situation, since I would like to control my situation as much as possible, while still staying within the legal limits. I looked around for software solving my problem.

For income tax there are online calculators available, but my case was more complex with the small business involved. I needed a tax forecasting tool covering both the business and the personal income taxes with all the complex dividend rules considered.

What does a software developer do in such a situation?

Yes, your guess is right. I ended up implementing the whole tax calculation in a Python script. The first version was more of a hack giving a rough estimate, but still better than nothing.

I put the whole "forward" calculation into a few embedded loops to search the problem space for the global optimum of highest net income while keeping the total cost constant. This optimum is the same as paying the least on taxes, the two definitions are equivalent. Also plotted the results to visualize the solution space. Here we go, finally some usable results.

To my positive surprise I could save a significant amount this way. All I had to do is choosing the right salaries for me and my wife, then paying out the rest of the revenue according to the dividend rules after the financial year is closed.

It worked well for me in 2018, but what other consultants can do? Running my Python script? Not too straightforward solution.

This is how the idea of OptiTax, an online business income forecasting tool was born.

Today's Top Milestones
  • Posted on Reddit & LTD Sold!
    I've been always afraid of posting to such resources as Reddit or Hacker News. Because of this "imperfection syndrome", when you know that no everythi
  • New library - ICONZ
    I am so happy to announce that we created a new premium 3D library ICONZ 🎉 🎉 After months of work and preparation, it is finally here. I believe ICO
  • Breather: Released Version 1!
    So I have finally gotten around to "finishing" a small side project I had lying around, called Breather. It's a mindfulness app that helps you keep a
  • Reached 1000+ paid users!
    We recently reached our 1000+ paid users - we would like to thanks our all users and team for this great effort and amazing work. In that time all Us
  • Launch day
    The last few bugs for the site were fixed and the site was shipped live! I’m incredibly proud of launching a product but have loved the journey and st
  • Launch day
    The last few bugs for the site were fixed and the site was shipped live! I’m incredibly proud of launching a product but have loved the journey and st
  • 10 presales of my podcasting course! 🙌
    When I launched the presale page for my course this week, I told my subscribers that I needed at least 10 preorders before Nov. 1 for me to commit to
  • First beta user: reflections
    We helped fill the role. Guy was delighted. However, a few learnings: (1) Our value was not fully realised since the volume isn't there - designing an
  • First production use
    Yesterday I received a message from one company that they use https://github.com/chatscope/chat-ui-kit-react to build their commercial product. The be
  • Crossed 500$ in book sales
    The book I wrote in May/June just crossed 500$ in sales. I put the book on Gumroad first as this was the easiest and cheapest way to share my work wit