v3.22.0.1
Cash and Cash Equivalents and Marketable Securities
12 Months Ended
Dec. 31, 2021
Cash and Cash Equivalents and Marketable Securities [Abstract]  
Cash and Cash Equivalents and Marketable Securities Cash and Cash Equivalents and Marketable Securities
The following table sets forth the cash and cash equivalents and marketable securities (in millions):
December 31,
20212020
Cash and cash equivalents:
Cash$7,308 $6,488 
Money market funds8,850 9,755 
U.S. government securities25 1,016 
U.S. government agency securities108 — 
Certificates of deposit and time deposits250 305 
Corporate debt securities60 12 
Total cash and cash equivalents16,601 17,576 
Marketable securities:
U.S. government securities10,901 20,921 
U.S. government agency securities5,927 11,698 
Corporate debt securities14,569 11,759 
Total marketable securities31,397 44,378 
Total cash and cash equivalents and marketable securities$47,998 $61,954 

The gross unrealized gains on our marketable securities were not material and $641 million as of December 31, 2021 and 2020, respectively. The gross unrealized losses and the allowance for credit losses on our marketable securities were not material as of December 31, 2021 and 2020.

The following table classifies our marketable securities by contractual maturities (in millions):
December 31, 2021
Due within one year$3,352 
Due after one year to five years28,045 
Total$31,397