Financial Instruments - Summary of gains and losses for Debt Securities (Details) - USD ($) $ in Millions |
12 Months Ended | ||
|---|---|---|---|
Dec. 31, 2022 |
Dec. 31, 2021 |
Dec. 31, 2020 |
|
| Fair Value Disclosures [Abstract] | |||
| Unrealized gain (loss) on fair value option debt securities | $ (557) | $ (122) | $ 86 |
| Gross realized gain on debt securities | 103 | 432 | 899 |
| Gross realized loss on debt securities | (1,588) | (329) | (184) |
| (Increase)/decrease in allowance for credit losses | (22) | (91) | (76) |
| Total gain (loss) on debt securities recognized in other income (expense), net | (2,064) | (110) | 725 |
| Accumulated unrealized net gains (losses) | $ (592) | $ (35) | $ 87 |