Something else came to my mind to consider as well for 3rd pillar, the income tax you save due to contributions.
Are they, compared to income tax? You can find comparison tables for example here or here or also individual calculators.
Maybe it was a bit misleading, but the effective tax amount is rather high, as you pay it on the whole capital, whereas for taxable accounts you “only” pay it on the income.
Few suggestions, I am sure there are more:

“Dividend income strategies” are tax inefficient in CH (unless done via tax free accounts). Better to focus on capital gains instead

The financial industry pushes us to contribute to 3 pillar to get tax savings. Think carefully if you are young and on lower salary. The tax benefit may be small and your money is then locked up, often at low rates of return (depends on provider)

For 2 and 3 pillar be careful with the statement often made by providers “you may be able to withdraw it if you leave Switzerland and pay a reduced rate of swiss tax”. This is true but there is often tax to pay in the destination country. Make sure you understand this and have a plan

Forego trading shares and options once your NW becomes large relative to salary. Else there is a risk of being classed as a professional investor and having to pay tax on capital gains on your entire portfolio
This doesn’t really matter as you can invest the pretax amount via 3a. As I see it, the main points that matter for 3a are (ignoring complexities such as leaving the country):
 The difference between the marginal income tax rate (at the time of contribution) and the capital withdrawal tax rate. This can easily be a 20 percentage point difference depending on your income and tax residence.
 The difference between 3a and regular broker/ETFs with regards to yearly fees and taxes. With 3a you don’t pay wealth taxes or dividend taxes but the fees are higher compared to investing with IBKR and low TER ETFs. The tax savings can easily compensate the higher fees as long as you’re working (again, depending on your income, tax residence and also total wealth). It may be different after early retirement, though.
 Liquidity/availability of capital is obviously restricted for 3a
The capital withdrawal tax rate and the income tax rate can’t be really compared. The point is, that one rate is applied before, the other one after growth.
Backofthe envelope example with made up numbers:
 Income tax rate: 30%
 Capital withdrawal tax rate: 10%.
 Pay 6k into 3a, save 1.8k in taxes.
 The 6k is locked in for 35 years, compunding at 7%.
 After 35 years, the 6k turns into 64k and the 10% tax is 6.4k.
The calculation would have to be refined though, but it’s not exactly “let’s save 20% on taxes”.
The providers selling 3a solutions are always advertising “saving of taxes”. TrueWealth, which is selling a non3a investment solution once had an article about “debunking the tax saving myths”. I can’t find the article anymore, but here’s a similar one: Aktien in der Säule 3a – eine Steuerfalle?
I personally don’t have any 3a, mainly because for me it’s not worth it locking down the funds for decades.
I once did a full calculation for somebody, who was deciding about whether to put money into 3a or IB (i.e. simulating all the taxes at the exact rates and all the tax savings with the exact parameters for that person). The result was that it didn’t make any difference. Person went with IB, since for the same outcome, it had the advantage of not locking down the funds.
In your calculation, you don’t consider that the tax saving can also be invested over 20 years. That would also result in an additional 20k (approx.).
Would be interesting to see on which assumptions it was based upon. What is written in the article is correct, but it doesn’t take into account taxes not paid on dividend in 3a account. And they are not exactly a neutral party.
I will try to run some simulations.
Just to complete the example:
Income tax rate  30.0% 

Total return gross  7.0% 
Total return in 3a due to 0.5% higher fees  6.5% 
Total return outside 3a after income tax on 2% dividends  6.4% 
Investment 3a  6’883 
Investment outside 3a after income tax  4’818 
Capital withdrawal tax (rather high)  10.0% 
Return after tax after 5, 10, 25 years:
Return  5  10  25  

3a before withdrawal  6’883  6.5%  9’430  12’920  33’229 
3a after withdrawal  10.0%  8’487  11’628  29’906  
Outside 3a  4’818  6.4%  6’570  8’960  22’720 
No, it really doesn’t matter (ignoring my second point of yearly fee/tax differences).
In your example you have CHF 57’654 after withdrawal from 3a.
You arrive at exactly the same amount if you were to pay the 10% before investing. You would invest CHF 5’400 instead of CHF 6’000. CHF 5’400 * 1.07^35 = CHF 57’654
Outside 3a you pay 30% of taxes before investing. I.e. you would invest CHF 4’200 instead of CHF 6’000. CHF 4’200 * 1.07^35 = CHF 44’842.
With 3a you have an extra 28.6% because of the lower taxes. You can also directly calculate this with the tax rates: (100%  10%) / (100%  30%) = 28.6%
I read that TrueWealth article as well. I don’t remember the details but I remember it included a bad calculation. I guess they realized at some point and deleted the post. Most likely it compared investing 6’800 pretax money into 3a with investing 6’800 posttax money outside 3a, incorrectly accounting for tax savings separately. That’s commonly done, just like in the linked article, but it’s still a terrible comparison. You have to compare investing the 6’800 pretax into 3a with investing e.g. 4’600 posttax outside 3a.
I think the simplest way to compare efficiency of 3a investment is to look when taxes saved become lower than taxes paid. Assuming a low marginal tax rate 20%, high withdrawal tax 10%, a very good investment return of 7% in CHF, our stake should double to achieve this situation. This should happen after
ln(20%/10%)/ln(1.07) = 10.2 years
If your income tax is 30%, the formula gives 16.2 years. If in addition we assume returns of 5%, it becomes 22.5 years.
Considering other parameters, I think that 3a investment should be more profitable than given by this simple estimate.
No, if I’m understanding this correctly, I don’t think this makes sense. With 3a you effectively invest the tax savings (as you invest pretax money), which means that your tax savings grow as part of your portfolio.
If we assume the yearly net return is identical (higher 3a fees are exactly compensated by absence of wealth and dividend taxes), it doesn’t matter how many years you leave your money in 3a. The tax effect won’t change (except for the progressive withdrawal tax).
Then, assuming a dividend yield of 2% on 3a investment, which can be increased by appropriately chosing what should go to the 3a account:
and a low tax rate of 20%, we get a 0.4% saving on taxes on dividend paid to 3a instead of a taxable account. This is enough to compensate TER difference between finpension or VIAC and taxable ETFs.
You are right. I did a lower estimate of 3a efficiency.
Very helpful, thanks for all the comments! So do we have a consensus on 3a contributions ?
Not yet. If you are 25 and your marginal tax rate is 20% or less, then probably 3a investment is not worth it. Especially considering changing legislation risk.
My take: since we have those low cost, pick your amount of equity offers (frankly, viac, finpension), if your 3a is a small amount of your wealth, it’s likely a no brainer (you probably have a high marginal tax rate and don’t care about having the money locked in).
If not (e.g. early career professional), might make sense to wait until the lockin doesn’t matter as much and the marginal tax rate is higher (higher savings), esp. with the likely upcoming legislation changes.
Thanks, I didn’t realize that this would be the same result.
You got lucky that I have no life besides my spreadsheets Thanks for the question, as it made me revise my plan. I went back to the drawing board and I can report the following findings:
 With high salary (>130k) and 20+ years available, maxing out pillar 3 and investing all is the clear winner
 With high salary (>130k) and up to 10 years available, voluntary pension contributions and maxing out pillar 3 investments wins
 When earning less, the tax effect of pillar 2 and 3 contribution is not as marked and investing all wins.
Another interesting thing happens after retirement at age 65:
Withdrawing all capital and investing it leaves massively more money for you to spend and wealth for your heirs than leaving everything in the pension fund and getting a monthly “salary”.
Happy for anyone to review/comment my assumptions and calculations (Vorsorge vs. Investment  Google Tabellen)