Taxes payment(Dividend,Stocks)

Hey, I’ve seen that the tax is automatically paid when I receive a dividend. Question: Is Tax also automatically paid when I sell stocks?

Other financial transaction taxes, such as UK stamp duty or French financial transaction tax, are paid on purchase. But capital gains taxes (e.g. Abgeltungsteuer in Germany) are not automatically paid on sale. They are something each investor has to compute for himself and pay to his country of tax residence on a yearly basis (or ask an accountant to calculate). The tax on dividends of US companies is a special case, that arises from agreements that the US has with other countries concerning its right to tax dividends of US companies. (e.g Article 10 2(b) of the UK/USA Double Taxation Treaty).