Pension and other post-retirement benefits - Weighted-average assumptions (Details 5) - Defined benefit pension plans
Dec. 31, 2022
Dec. 31, 2021
Dec. 31, 2020
Switzerland      
Defined benefit plan, Disclosure      
Weighted-average plan asset allocation (as a percent)   100.00% 100.00%
Switzerland | Forecast/Estimate      
Target asset allocation next fiscal year (%)      
Target weighted-average asset allocations (as a percent) 100.00%    
Switzerland | Cash and cash equivalents      
Defined benefit plan, Disclosure      
Weighted-average plan asset allocation (as a percent)   1.60% 2.50%
Switzerland | Cash and cash equivalents | Forecast/Estimate      
Target asset allocation next fiscal year (%)      
Target weighted-average asset allocations (as a percent) 7.00%    
Switzerland | Debt securities      
Defined benefit plan, Disclosure      
Weighted-average plan asset allocation (as a percent)   35.20% 32.70%
Switzerland | Debt securities | Forecast/Estimate      
Target asset allocation next fiscal year (%)      
Target weighted-average asset allocations (as a percent) 32.00%    
Switzerland | Equity securities      
Defined benefit plan, Disclosure      
Weighted-average plan asset allocation (as a percent)   27.30% 29.60%
Switzerland | Equity securities | Forecast/Estimate      
Target asset allocation next fiscal year (%)      
Target weighted-average asset allocations (as a percent) 25.00%    
Switzerland | Real estate      
Defined benefit plan, Disclosure      
Weighted-average plan asset allocation (as a percent)   18.40% 18.00%
Switzerland | Real estate | Forecast/Estimate      
Target asset allocation next fiscal year (%)      
Target weighted-average asset allocations (as a percent) 21.00%    
Switzerland | Alternative investments      
Defined benefit plan, Disclosure      
Weighted-average plan asset allocation (as a percent)   17.50% 17.20%
Switzerland | Alternative investments | Forecast/Estimate      
Target asset allocation next fiscal year (%)      
Target weighted-average asset allocations (as a percent) 15.00%    
Switzerland | Insurance      
Defined benefit plan, Disclosure      
Weighted-average plan asset allocation (as a percent)   0.00% 0.00%
Switzerland | Insurance | Forecast/Estimate      
Target asset allocation next fiscal year (%)      
Target weighted-average asset allocations (as a percent) 0.00%    
International      
Defined benefit plan, Disclosure      
Weighted-average plan asset allocation (as a percent)   100.00% 100.00%
International | Forecast/Estimate      
Target asset allocation next fiscal year (%)      
Target weighted-average asset allocations (as a percent) 100.00%    
International | Cash and cash equivalents      
Defined benefit plan, Disclosure      
Weighted-average plan asset allocation (as a percent)   2.90% 6.30%
International | Cash and cash equivalents | Forecast/Estimate      
Target asset allocation next fiscal year (%)      
Target weighted-average asset allocations (as a percent) 0.30%    
International | Debt securities      
Defined benefit plan, Disclosure      
Weighted-average plan asset allocation (as a percent)   92.90% 90.50%
International | Debt securities | Forecast/Estimate      
Target asset allocation next fiscal year (%)      
Target weighted-average asset allocations (as a percent) 93.40%    
International | Equity securities      
Defined benefit plan, Disclosure      
Weighted-average plan asset allocation (as a percent)   2.60% 2.00%
International | Equity securities | Forecast/Estimate      
Target asset allocation next fiscal year (%)      
Target weighted-average asset allocations (as a percent) 2.20%    
International | Real estate      
Defined benefit plan, Disclosure      
Weighted-average plan asset allocation (as a percent)   0.00% 0.50%
International | Real estate | Forecast/Estimate      
Target asset allocation next fiscal year (%)      
Target weighted-average asset allocations (as a percent) 0.60%    
International | Alternative investments      
Defined benefit plan, Disclosure      
Weighted-average plan asset allocation (as a percent)   (0.70%) (1.10%)
International | Alternative investments | Forecast/Estimate      
Target asset allocation next fiscal year (%)      
Target weighted-average asset allocations (as a percent) 1.20%    
International | Insurance      
Defined benefit plan, Disclosure      
Weighted-average plan asset allocation (as a percent)   2.30% 1.80%
International | Insurance | Forecast/Estimate      
Target asset allocation next fiscal year (%)      
Target weighted-average asset allocations (as a percent) 2.30%    
Bank | International      
Defined benefit plan, Disclosure      
Weighted-average plan asset allocation (as a percent)   100.00% 100.00%
Bank | International | Forecast/Estimate      
Target asset allocation next fiscal year (%)      
Target weighted-average asset allocations (as a percent) 100.00%    
Bank | International | Cash and cash equivalents      
Defined benefit plan, Disclosure      
Weighted-average plan asset allocation (as a percent)   2.90% 6.30%
Bank | International | Cash and cash equivalents | Forecast/Estimate      
Target asset allocation next fiscal year (%)      
Target weighted-average asset allocations (as a percent) 0.30%    
Bank | International | Debt securities      
Defined benefit plan, Disclosure      
Weighted-average plan asset allocation (as a percent)   92.90% 90.50%
Bank | International | Debt securities | Forecast/Estimate      
Target asset allocation next fiscal year (%)      
Target weighted-average asset allocations (as a percent) 93.40%    
Bank | International | Equity securities      
Defined benefit plan, Disclosure      
Weighted-average plan asset allocation (as a percent)   2.60% 2.00%
Bank | International | Equity securities | Forecast/Estimate      
Target asset allocation next fiscal year (%)      
Target weighted-average asset allocations (as a percent) 2.20%    
Bank | International | Real estate      
Defined benefit plan, Disclosure      
Weighted-average plan asset allocation (as a percent)   0.00% 0.50%
Bank | International | Real estate | Forecast/Estimate      
Target asset allocation next fiscal year (%)      
Target weighted-average asset allocations (as a percent) 0.60%    
Bank | International | Alternative investments      
Defined benefit plan, Disclosure      
Weighted-average plan asset allocation (as a percent)   (0.70%) (1.10%)
Bank | International | Alternative investments | Forecast/Estimate      
Target asset allocation next fiscal year (%)      
Target weighted-average asset allocations (as a percent) 1.20%    
Bank | International | Insurance      
Defined benefit plan, Disclosure      
Weighted-average plan asset allocation (as a percent)   2.30% 1.80%
Bank | International | Insurance | Forecast/Estimate      
Target asset allocation next fiscal year (%)      
Target weighted-average asset allocations (as a percent) 2.30%