Fair Value Measurement - Assets Measured at Fair Value (Details) - USD ($) $ in Millions | Jun. 30, 2018 | Dec. 31, 2017 |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Marketable securities | $ 30,757 | $ 33,632 |
U.S. government securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Marketable securities | 12,961 | 12,766 |
U.S. government agency securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Marketable securities | 8,659 | 10,944 |
Corporate debt securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Marketable securities | 9,137 | 9,922 |
Fair Value, Measurements, Recurring | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Total cash equivalents and marketable securities | 40,192 | 39,499 |
Fair Value, Measurements, Recurring | Quoted Prices in Active Markets for Identical Assets (Level 1) | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Total cash equivalents and marketable securities | 29,715 | 29,069 |
Fair Value, Measurements, Recurring | Significant Other Observable Inputs (Level 2) | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Total cash equivalents and marketable securities | 10,477 | 10,430 |
Fair Value, Measurements, Recurring | Significant Unobservable Inputs (Level 3) | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Total cash equivalents and marketable securities | 0 | 0 |
Fair Value, Measurements, Recurring | U.S. government securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Marketable securities | 12,961 | 12,766 |
Fair Value, Measurements, Recurring | U.S. government securities | Quoted Prices in Active Markets for Identical Assets (Level 1) | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Marketable securities | 12,961 | 12,766 |
Fair Value, Measurements, Recurring | U.S. government securities | Significant Other Observable Inputs (Level 2) | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Marketable securities | 0 | 0 |
Fair Value, Measurements, Recurring | U.S. government securities | Significant Unobservable Inputs (Level 3) | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Marketable securities | 0 | 0 |
Fair Value, Measurements, Recurring | U.S. government agency securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Marketable securities | 8,659 | 10,944 |
Fair Value, Measurements, Recurring | U.S. government agency securities | Quoted Prices in Active Markets for Identical Assets (Level 1) | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Marketable securities | 8,659 | 10,944 |
Fair Value, Measurements, Recurring | U.S. government agency securities | Significant Other Observable Inputs (Level 2) | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Marketable securities | 0 | 0 |
Fair Value, Measurements, Recurring | U.S. government agency securities | Significant Unobservable Inputs (Level 3) | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Marketable securities | 0 | 0 |
Fair Value, Measurements, Recurring | Corporate debt securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Marketable securities | 9,137 | 9,922 |
Fair Value, Measurements, Recurring | Corporate debt securities | Quoted Prices in Active Markets for Identical Assets (Level 1) | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Marketable securities | 0 | 0 |
Fair Value, Measurements, Recurring | Corporate debt securities | Significant Other Observable Inputs (Level 2) | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Marketable securities | 9,137 | 9,922 |
Fair Value, Measurements, Recurring | Corporate debt securities | Significant Unobservable Inputs (Level 3) | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Marketable securities | 0 | 0 |
Fair Value, Measurements, Recurring | Money market funds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Cash equivalents | 6,676 | 5,268 |
Fair Value, Measurements, Recurring | Money market funds | Quoted Prices in Active Markets for Identical Assets (Level 1) | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Cash equivalents | 6,676 | 5,268 |
Fair Value, Measurements, Recurring | Money market funds | Significant Other Observable Inputs (Level 2) | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Cash equivalents | 0 | 0 |
Fair Value, Measurements, Recurring | Money market funds | Significant Unobservable Inputs (Level 3) | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Cash equivalents | 0 | 0 |
Fair Value, Measurements, Recurring | U.S. government securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Cash equivalents | 961 | 66 |
Fair Value, Measurements, Recurring | U.S. government securities | Quoted Prices in Active Markets for Identical Assets (Level 1) | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Cash equivalents | 961 | 66 |
Fair Value, Measurements, Recurring | U.S. government securities | Significant Other Observable Inputs (Level 2) | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Cash equivalents | 0 | 0 |
Fair Value, Measurements, Recurring | U.S. government securities | Significant Unobservable Inputs (Level 3) | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Cash equivalents | 0 | 0 |
Fair Value, Measurements, Recurring | U.S. government agency securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Cash equivalents | 458 | 25 |
Fair Value, Measurements, Recurring | U.S. government agency securities | Quoted Prices in Active Markets for Identical Assets (Level 1) | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Cash equivalents | 458 | 25 |
Fair Value, Measurements, Recurring | U.S. government agency securities | Significant Other Observable Inputs (Level 2) | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Cash equivalents | 0 | 0 |
Fair Value, Measurements, Recurring | U.S. government agency securities | Significant Unobservable Inputs (Level 3) | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Cash equivalents | 0 | 0 |
Fair Value, Measurements, Recurring | Certificate of deposits and time deposits | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Cash equivalents | 1,340 | 440 |
Fair Value, Measurements, Recurring | Certificate of deposits and time deposits | Quoted Prices in Active Markets for Identical Assets (Level 1) | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Cash equivalents | 0 | 0 |
Fair Value, Measurements, Recurring | Certificate of deposits and time deposits | Significant Other Observable Inputs (Level 2) | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Cash equivalents | 1,340 | 440 |
Fair Value, Measurements, Recurring | Certificate of deposits and time deposits | Significant Unobservable Inputs (Level 3) | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Cash equivalents | $ 0 | 0 |
Fair Value, Measurements, Recurring | Corporate debt securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Cash equivalents | | 68 |
Fair Value, Measurements, Recurring | Corporate debt securities | Quoted Prices in Active Markets for Identical Assets (Level 1) | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Cash equivalents | | 0 |
Fair Value, Measurements, Recurring | Corporate debt securities | Significant Other Observable Inputs (Level 2) | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Cash equivalents | | 68 |
Fair Value, Measurements, Recurring | Corporate debt securities | Significant Unobservable Inputs (Level 3) | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis | | |
Cash equivalents | | $ 0 |