Excel Project:

profileMaty007
Financial_Report.xlsx

Document and Entity Information

Document and Entity Information - USD ($) $ in Millions 12 Months Ended
Dec. 31, 2019 Feb. 06, 2020 Jun. 30, 2019
Cover page.
Document Type 10-K
Document Annual Report true
Document Transition Report false
Amendment Flag false
Entity Central Index Key 0001418091
Document Period End Date Dec. 31, 2019
Entity File Number 001-36164
Entity Registrant Name Twitter, Inc.
Entity Incorporation, State or Country Code DE
Entity Tax Identification Number 20-8913779
Entity Address, Address Line One 1355 Market Street
Entity Address, Address Line Two Suite 900
Entity Address, City or Town San Francisco
Entity Address, State or Province CA
Entity Address, Postal Zip Code 94103
City Area Code 415
Local Phone Number 222-9670
Title of 12(b) Security Common Stock, par value $0.000005 per share
Trading Symbol TWTR
Security Exchange Name NYSE
Entity Well-known Seasoned Issuer Yes
Entity Current Reporting Status Yes
Entity Voluntary Filers No
Entity Interactive Data Current Yes
Document Fiscal Period Focus FY
Document Fiscal Year Focus 2019
Current Fiscal Year End Date --12-31
Entity Filer Category Large Accelerated Filer
Entity Small Business false
Entity Emerging Growth Company false
Entity Shell Company false
Entity Public Float $ 26,350
Entity Common Stock, Shares Outstanding 782,287,089

CONSOLIDATED BALANCE SHEETS

CONSOLIDATED BALANCE SHEETS - USD ($) $ in Thousands Dec. 31, 2019 Dec. 31, 2018
Current assets:
Cash and Cash Equivalents $ 1,799,082 $ 1,894,444
Short-term investments 4,839,970 4,314,957
Accounts receivable, net of allowance for doubtful accounts of $2,401 and $3,559 850,184 788,700
Prepaid expenses and other current assets 130,839 112,935
Total current assets 7,620,075 7,111,036
Property and equipment, net 1,031,781 885,078
Operating lease right-of-use assets 697,095
Intangible assets, net 55,106 45,025
Goodwill 1,256,699 1,227,269
Deferred tax assets, net 1,908,086 808,459
Other assets 134,547 85,705
Total assets 12,703,389 10,162,572
Current liabilities:
Accounts payable 161,148 145,186
Accrued and other current liabilities 500,893 405,751
Convertible notes, short-term 0 897,328
Operating lease liabilities, short-term 146,959
Finance lease liabilities, short-term 23,476
Finance lease liabilities, short-term 68,046
Total current liabilities 832,476 1,516,311
Convertible notes, long-term 1,816,833 1,730,922
Senior notes, long-term 691,967 0
Operating lease liabilities, long-term 609,245
Finance lease liabilities, long-term 205 24,394
Deferred and other long-term tax liabilities, net 24,170 17,849
Other long-term liabilities 24,107 67,502
Total liabilities 3,999,003 3,356,978
Commitments and contingencies (Note 16)
Stockholders' equity:
Preferred stock, $0.000005 par value-- 200,000 shares authorized; none issued and outstanding 0 0
Common stock, $0.000005 par value-- 5,000,000 shares authorized; 779,619 and 764,257 shares issued and outstanding 4 4
Additional paid-in capital 8,763,330 8,324,974
Accumulated other comprehensive loss (70,534) (65,311)
Retained earnings (accumulated deficit) 11,586 (1,454,073)
Total stockholders' equity 8,704,386 6,805,594
Total liabilities and stockholders' equity $ 12,703,389 $ 10,162,572

CONSOLIDATED BALANCE SHEETS (Pa

CONSOLIDATED BALANCE SHEETS (Parenthetical) - USD ($) $ in Thousands Dec. 31, 2019 Dec. 31, 2018
Statement of Financial Position [Abstract]
Allowance for doubtful accounts receivable $ 2,401 $ 3,559
Preferred stock, par value $ 0.000005 $ 0.000005
Preferred stock, shares authorized 200,000,000 200,000,000
Preferred stock, shares issued 0 0
Preferred stock, shares outstanding 0 0
Common stock, par value $ 0.000005 $ 0.000005
Common stock, shares authorized 5,000,000,000 5,000,000,000
Common stock, shares issued 779,619,000 779,619,000
Common stock, shares outstanding 764,257,000 764,257,000

CONSOLIDATED STATEMENTS OF OPER

CONSOLIDATED STATEMENTS OF OPERATIONS - USD ($) shares in Thousands, $ in Thousands 12 Months Ended
Dec. 31, 2019 Dec. 31, 2018 Dec. 31, 2017
Income Statement [Abstract]
Revenue $ 3,459,329 $ 3,042,359 $ 2,443,299
Costs and expenses
Cost of revenue 1,137,041 964,997 861,242
Research and development 682,281 553,858 542,010
Sales and marketing 913,813 771,361 717,419
General and administrative 359,821 298,818 283,888
Total costs and expenses 3,092,956 2,589,034 2,404,559
Income from operations 366,373 453,325 38,740
Interest expense (138,180) (132,606) (105,237)
Interest income 157,703 111,221 44,383
Other income (expense), net 4,243 (8,396) (73,304)
Income (loss) before income taxes 390,139 423,544 (95,418)
Provision (benefit) for income taxes (1,075,520) (782,052) 12,645
Net income (loss) $ 1,465,659 $ 1,205,596 $ (108,063)
Net income (loss) per share attributable to common stockholders:
Basic (in dollars per share) $ 1.90 $ 1.60 $ (0.15)
Diluted (in dollars per share) $ 1.87 $ 1.56 $ (0.15)
Weighted-average shares used to compute net income (loss) per share attributable to common stockholders:
Basic (in shares) 770,729 754,326 732,702
Diluted (in shares) 785,531 772,686 732,702

CONSOLIDATED STATEMENTS OF COMP

CONSOLIDATED STATEMENTS OF COMPREHENSIVE INCOME (LOSS) - USD ($) $ in Thousands 12 Months Ended
Dec. 31, 2019 Dec. 31, 2018 Dec. 31, 2017
Statement of Comprehensive Income [Abstract]
Net income (loss) $ 1,465,659 $ 1,205,596 $ (108,063)
Other comprehensive income (loss), net of tax:
Change in unrealized gain (loss) on investments in available-for-sale securities 13,785 (393) (1,325)
Change in foreign currency translation adjustment (19,008) (33,339) 38,999
Net change in accumulated other comprehensive income (loss) (5,223) (33,732) 37,674
Comprehensive income (loss) $ 1,460,436 $ 1,171,864 $ (70,389)

CONSOLIDATED STATEMENTS OF STOC

CONSOLIDATED STATEMENTS OF STOCKHOLDERS' EQUITY - USD ($) shares in Thousands, $ in Thousands Total Common Stock Additional Paid-in Capital Accumulated Other Comprehensive Loss Retained earnings (accumulated deficit)
Balance, beginning of period, shares at Dec. 31, 2016 721,572
Balance, beginning of period at Dec. 31, 2016 $ 4 $ 7,224,534 $ (69,253) $ (2,550,350)
Issuance of common stock in connection with RSU vesting, shares 20,855
Exercise of stock options, shares 3,733
Exercise of stock options 9,515
Issuance of common stock upon purchases under employee stock purchase plan, shares 1,735
Issuance of common stock upon purchases under employee stock purchase plan 23,920
Shares withheld related to net share settlement of equity awards, shares (531)
Shares withheld related to net share settlement of equity awards (8,962)
Stock-based compensation 488,123
Purchase of convertible note hedge $ 0
Other activities, shares (462)
Other activities 76
Other comprehensive income (loss) 37,674 37,674
Net income (loss) $ (108,063) (108,063)
Balance, end of period, shares at Dec. 31, 2017 746,902 746,902
Balance, end of period at Dec. 31, 2017 $ 5,047,218 $ 4 7,750,522 (31,579) (2,671,729)
Issuance of common stock in connection with RSU vesting, shares 15,026
Cumulative-effect adjustment from adoption of revenue recognition rule | Adoption of ASC Topic 606 12,060
Issuance of common stock in connection with acquisitions, shares 119
Issuance of common stock in connection with acquisitions 5,405
Issuance of stock options in connection with acquisitions 917
Issuance of restricted stock in connection with acquisitions accounted for as stock-based compensation, shares 655
Issuance of restricted stock in connection with acquisitions 12,843
Exercise of stock options, shares 634
Exercise of stock options 3,442
Issuance of common stock upon purchases under employee stock purchase plan, shares 1,500 1,539
Issuance of common stock upon purchases under employee stock purchase plan 29,288
Shares withheld related to net share settlement of equity awards, shares (610)
Shares withheld related to net share settlement of equity awards (19,256)
Stock-based compensation 367,668
Equity component of the convertible note issuance, net 252,248
Purchase of convertible note hedge $ 267,950 (267,950)
Issuance of warrants 186,760
Other activities, shares (8)
Other activities 3,087
Other comprehensive income (loss) (33,732) (33,732)
Net income (loss) $ 1,205,596 1,205,596
Balance, end of period, shares at Dec. 31, 2018 764,257 764,257
Balance, end of period at Dec. 31, 2018 $ 6,805,594 $ 4 8,324,974 (65,311) (1,454,073)
Issuance of common stock in connection with RSU vesting, shares 13,519
Issuance of restricted stock in connection with acquisitions accounted for as stock-based compensation, shares 471
Exercise of stock options, shares 361 361
Exercise of stock options 788
Issuance of common stock upon purchases under employee stock purchase plan, shares 1,600 1,592
Issuance of common stock upon purchases under employee stock purchase plan 42,378
Shares withheld related to net share settlement of equity awards, shares (579)
Shares withheld related to net share settlement of equity awards (19,594)
Stock-based compensation 414,784
Purchase of convertible note hedge $ 0
Other activities, shares (2)
Other comprehensive income (loss) (5,223) (5,223)
Net income (loss) $ 1,465,659 1,465,659
Balance, end of period, shares at Dec. 31, 2019 779,619 779,619
Balance, end of period at Dec. 31, 2019 $ 8,704,386 $ 4 $ 8,763,330 $ (70,534) $ 11,586

CONSOLIDATED STATEMENTS OF CASH

CONSOLIDATED STATEMENTS OF CASH FLOWS - USD ($) $ in Thousands 12 Months Ended
Dec. 31, 2019 Dec. 31, 2018 Dec. 31, 2017
Cash flows from operating activities
Net income (loss) $ 1,465,659 $ 1,205,596 $ (108,063)
Adjustments to reconcile net income (loss) to net cash provided by operating activities:
Depreciation and amortization expense 465,549 425,498 395,867
Stock-based compensation expense 378,025 326,228 433,806
Amortization of discount on convertible notes 113,298 105,926 80,061
Deferred income taxes 84,369 43,409 (6,415)
Deferred tax assets valuation allowance release 0 (845,129) 0
Deferred tax assets establishment related to intra-entity transfers of intangible assets (1,206,880) 0 0
Impairment of investments in privately-held companies 1,550 3,000 62,439
Other adjustments (16,906) (14,139) 5,753
Changes in assets and liabilities, net of assets acquired and liabilities assumed from acquisitions:
Accounts receivable (67,000) (130,871) 2,668
Prepaid expenses and other assets (29,602) 126,470 (13,974)
Operating lease right-of-use assets 149,880 0 0
Accounts payable 2,946 (1,533) 8,371
Accrued and other liabilities 92,681 95,256 (29,304)
Operating lease liabilities (130,205) 0 0
Net cash provided by operating activities 1,303,364 1,339,711 831,209
Cash flows from investing activities
Purchases of property and equipment (540,688) (483,934) (160,742)
Proceeds from sales of property and equipment 6,158 13,070 2,783
Purchases of marketable securities (5,798,111) (5,334,396) (2,687,214)
Proceeds from maturities of marketable securities 4,928,097 3,732,973 2,579,747
Proceeds from sales of marketable securities 367,116 58,721 124,826
Purchases of investments in privately-held companies (51,163) (3,375) (825)
Proceeds from sales of long-lived assets 11,781 0 35,000
Business combinations, net of cash acquired (29,664) (33,572) 0
Other investing activities (9,500) (5,000) (10,101)
Net cash used in investing activities (1,115,974) (2,055,513) (116,526)
Cash flows from financing activities
Proceeds from issuance of senior notes 700,000 0 0
Proceeds from issuance of convertible notes 0 1,150,000 0
Purchases of convertible note hedges 0 (267,950) 0
Proceeds from issuance of warrants concurrent with note hedges 0 186,760 0
Debt issuance costs (8,070) (13,783) 0
Repayment of convertible notes (935,000) 0 0
Taxes paid related to net share settlement of equity awards (19,594) (19,263) (8,962)
Payments of finance lease obligations (66,677) (90,351) (102,775)
Proceeds from exercise of stock options 788 3,415 9,444
Proceeds from issuances of common stock under employee stock purchase plan 42,378 29,288 23,920
Net cash provided by (used in) financing activities (286,175) 978,116 (78,373)
Net increase (decrease) in cash, cash equivalents and restricted cash (98,785) 262,314 636,310
Foreign exchange effect on cash, cash equivalents and restricted cash 4,576 (14,296) 9,914
Cash, cash equivalents and restricted cash at beginning of period 1,921,875 1,673,857 1,027,633
Cash, cash equivalents and restricted cash at end of period 1,827,666 1,921,875 1,673,857
Supplemental cash flow data
Interest paid in cash 12,236 14,547 13,990
Income taxes paid in cash 20,144 33,065 16,216
Supplemental disclosures of non-cash investing and financing activities
Common stock issued in connection with acquisitions 0 19,165 0
Right-of-Use Asset Obtained in Exchange for Finance Lease Liability 0
Equipment purchases under finance leases 16,086 123,235
Changes in accrued property and equipment purchases 14,985 (23,469) 16,387
Reconciliation of cash, cash equivalents and restricted cash as shown in the consolidated statements of cash flows
Cash and cash equivalents 1,799,082 1,894,444 1,638,413
Total cash, cash equivalents and restricted cash $ 1,921,875 $ 1,673,857 $ 1,673,857

The Company

The Company 12 Months Ended
Dec. 31, 2019
Accounting Policies [Abstract]
The Company The CompanyTwitter, Inc. (“Twitter” or the “Company”) was incorporated in Delaware in April 2007, and is headquartered in San Francisco, California. Twitter offers products and services for people, organizations, advertisers, developers and platform and data partners.

Summary of Significant Accounti

Summary of Significant Accounting Policies 12 Months Ended
Dec. 31, 2019
Accounting Policies [Abstract]
Summary of Significant Accounting Policies Summary of Significant Accounting Policies Principles of Consolidation The consolidated financial statements include the accounts of the Company and its wholly-owned subsidiaries. All intercompany accounts and transactions have been eliminated in consolidation. Prior Period Reclassifications Certain prior period amounts have been reclassified to conform to the current period presentation. Use of Estimates The preparation of the Company’s consolidated financial statements in conformity with generally accepted accounting principles in the United States of America (“GAAP”) requires management to make estimates and assumptions that affect the reported amounts of assets, liabilities, revenue and expenses, as well as related disclosure of contingent assets and liabilities. Actual results could differ materially from the Company’s estimates. To the extent that there are material differences between these estimates and actual results, the Company’s financial condition or operating results will be affected. The Company bases its estimates on past experience and other assumptions that management believes are reasonable based on its knowledge of current events, as well as its expectations about actions it may take in the future, and evaluates these estimates on an ongoing basis. Revenue Recognition The Company generates the substantial majority of its revenue from the sale of advertising services with the remaining balance from data licensing and other arrangements. The Company generates its advertising revenue primarily from the sale of its Promoted Products: (i) Promoted Tweets, (ii) Promoted Accounts and (iii) Promoted Trends. Promoted Tweets and Promoted Accounts are pay-for-performance advertising products or pay on impressions delivered, each priced through an auction. Promoted Trends are featured by geography and offered on a fixed-fee-per-day basis. Advertisers are obligated to pay when a person engages with a Promoted Tweet, follows a Promoted Account, when an impression is delivered, or when a Promoted Trend is displayed for an entire day in a particular country or on a global basis. These advertising services may be sold in combination as a bundled arrangement or separately on a stand-alone basis. For the Company's Promoted Product arrangements, significant judgments are (i) identifying the performance obligations in the contract, (ii) determining the basis for allocating contract consideration to performance obligations, (iii) determining whether the Company is the principal or the agent in arrangements where another party is involved in providing specified services to a customer, and (iv) estimating the transaction price to be allocated for contracts with tiered rebate provisions. The Company may generate revenue from the sale of certain Promoted Tweets through placement by Twitter of advertiser ads against third-party publisher content. The Company will pay the third-party publisher a revenue share fee for its right to monetize their content. In such transactions, advertisers are contracting to obtain a single integrated advertising service, the Promoted Tweet combined with the third-party publisher content, and the Company obtains control of the third-party publisher content displayed on Twitter that it then combines with the advertiser ads within the Promoted Tweet. Therefore, the Company reports advertising revenue generated from these transactions on a gross basis and records the related third-party content monetization fees as cost of revenue. The Company also generates advertising revenue by selling services in which the Company places ads on third-party publishers’ websites, applications or other offerings. To fulfill these transactions, the Company purchases advertising inventory from third-party publishers’ websites and applications where the Company has identified the advertisers’ targeted audience and therefore incurs traffic acquisition costs prior to transferring the advertising service to its customers. At such point, the Company has the sole ability to monetize the third-party publishers advertising inventory. In such transactions, the Company obtains control of a right to a service to be performed by the third-party publishers, which gives the Company the ability to direct those publishers to provide the services to the Company's customers on the Company's behalf. Therefore, the Company reports advertising revenue generated from these transactions on a gross basis and records the related traffic acquisition costs as cost of revenue. Fees for the advertising services above are recognized in the period when advertising is delivered as evidenced by a person engaging with a Promoted Tweet or an ad on a third-party publisher website or application in a manner satisfying the types of engagement selected by the advertisers, such as Tweet engagements (e.g., Retweets, replies and likes), website clicks, mobile application installs or engagements, obtaining new followers, or video views, following a Promoted Account, delivery of impressions, or through the display of a Promoted Trend on the Company's platform. The Company has concluded that its data licensing arrangements, which grant customers a right to Twitter’s intellectual property (“IP”) for a defined period of time, may contain a single performance obligation satisfied at a point in time (“Historical IP”) or over time (“Future IP”), or may contain two or more performance obligations satisfied separately at a point in time (Historical IP) and over time (Future IP). In some of the Company's data licensing arrangements, pricing is a fixed monthly fee over a specified term. In arrangements with a single performance obligation satisfied over time, data licensing revenue is recognized on a straight-line basis over the period in which the Company provides data as the customer consumes and benefits from the continuous data available on an ongoing basis. In arrangements with at least two performance obligations, the Company allocates revenue on a relative basis between the performance obligations based on standalone selling price (“SSP”) and recognizes revenue as the performance obligations are satisfied. In other data licensing arrangements, the Company charges customers based on the amount of sales they generate from downstream customers using Twitter data. Certain of those royalty-based data licensing arrangements are subject to minimum guarantees. For such arrangements with a minimum guarantee and a single Future IP performance obligation, the Company recognizes revenue for minimum guarantees on a straight-line basis over the period in which the Company provides data. For such arrangements with a minimum guarantee and two or more performance obligations, the Company allocates revenue on a relative basis between the performance obligations based on SSP and recognizes revenue as the performance obligations are satisfied. Royalties in excess of minimum guarantees, if any, are recognized as revenue over the contract term, on a straight-line, cumulative catch-up basis. This reflects the nature of the Company’s performance obligation, which is a series of distinct monthly periods of providing a license of IP. For data licensing arrangements involving two or more performance obligations, the Company uses directly observable standalone transactions to determine SSP of Historical IP. The Company uses standalone transactions and considers all other reasonably available observable evidence to estimate SSP of Future IP. Other revenue is primarily generated from service fees from transactions completed on the Company's mobile ad exchange. The Company's mobile ad exchange enables buyers and sellers to purchase and sell advertising inventory by matching them in the exchange. The Company has determined it is not the principal in the purchase and sale of advertising inventory in transactions between third-party buyers and sellers on the exchange because the Company does not obtain control of the advertising inventory. The Company reports revenue related to its ad exchange services on a net basis for the fees paid by buyers, net of costs related to acquiring the advertising inventory paid to sellers. Arrangements involving multiple performance obligations primarily consist of combinations of the Company's pay-for-performance products, Promoted Tweets and Promoted Accounts, which are priced through an auction, and Promoted Trends, which are priced on a fixed-fee-per day, per geography basis. For arrangements that include a combination of these products, the Company develops an estimate of the standalone selling price for these products in order to allocate any potential discount to all performance obligations in the arrangement. The estimate of standalone selling price for pay-for-performance auction based products is determined based on the winning bid price. The estimate of standalone selling price for Promoted Trends is based on Promoted Trends sold on a standalone basis and/or separately priced in a bundled arrangement by reference to a list price by geography, which is updated and approved periodically. For other arrangements involving multiple performance obligations where neither auction pricing nor standalone sales provide sufficient evidence of standalone selling price, the Company estimates standalone selling price using either an adjusted market assessment approach or an expected cost plus margin approach. The Company believes the use of its estimation approach and allocation of the transaction price on a relative standalone selling price basis to each performance obligation results in revenue recognition in a manner consistent with the underlying economics of the transaction and the allocation principle included in Topic 606. The Company has elected to exclude certain sales and indirect taxes from the determination of the transaction price. Cost of Revenue Cost of revenue includes infrastructure costs, other direct costs including revenue share expenses, amortization expense of technology acquired through acquisitions and amortization of capitalized labor costs for internally developed software, allocated facilities costs, as well as traffic acquisition costs (“TAC”). Infrastructure costs consist primarily of data center costs related to the Company’s co-located facilities, which include lease and hosting costs, related support and maintenance costs and energy and bandwidth costs, public cloud hosting costs, as well as depreciation of servers and networking equipment, and personnel-related costs, including salaries, benefits and stock-based compensation, for its operations teams. Revenue share expenses are primarily related to payments to providers from whom the Company licenses content, in order to increase engagement on the platform. The fees paid to these content providers may be based on revenues generated, or a minimum guaranteed fee. TAC consists of costs incurred with third parties in connection with the sale to advertisers of advertising products that the Company places on third-party publishers’ websites, applications or other offerings collectively resulting from acquisitions and from the Company’s organically-built advertising network, Twitter Audience Platform. Stock-Based Compensation Expense The Company accounts for stock-based compensation expense under the fair value recognition and measurement provisions of GAAP. Stock-based awards granted to employees are measured based on the grant-date fair value. For service-based restricted stock awards and performance-based restricted stock awards without market conditions, the Company recognizes the compensation expense only for those awards expected to meet the performance and service vesting condition on a straight-line basis over the requisite service period which is generally one year for performance vesting condition awards and up to five years for service vesting condition awards. For performance-based restricted stock awards with market conditions, the Company recognizes the compensation expense on a straight-line basis over the requisite service period regardless of whether the market condition is satisfied, provided that the requisite service has been provided, which is generally two years. The Company accounts for forfeitures as they occur. The Company estimates the fair value of stock options granted and stock purchase rights provided under the Company’s employee stock purchase plan using the Black-Scholes option pricing model on the dates of grant. The compensation expense related to stock options and employee stock purchase rights is recognized on a straight-line basis over the requisite service period. The fair value of performance-based restricted stock awards with market conditions is determined using a Monte Carlo simulation to estimate the grant date fair value. The Company issues restricted stock subject to a lapsing right of repurchase to continuing employees of certain acquired companies. Since these issuances are subject to post-acquisition employment, the Company accounts for them as post-acquisition stock-based compensation expense. The grant-date fair value of restricted stock granted in connection with acquisitions is recognized as stock-based compensation expense on a straight-line basis over the requisite service period. Acquisitions The Company accounts for acquisitions of entities that include inputs and processes and have the ability to create outputs as business combinations. The purchase price of the acquisition is allocated to the tangible and intangible assets acquired and liabilities assumed based on their estimated fair values at the acquisition dates. The excess of the purchase price over those fair values is recorded as goodwill. During the measurement period, which may be up to one year from the acquisition date, the Company may record adjustments to the assets acquired and liabilities assumed with the corresponding offset to goodwill. Upon the conclusion of the measurement period or final determination of the values of assets acquired or liabilities assumed, whichever comes first, any subsequent adjustments are recorded to the consolidated statements of operations. Investments in Privately-Held Companies The Company makes strategic investments in privately-held companies. The Company also evaluates each investee to determine if the investee is a variable interest entity and, if so, whether the Company is the primary beneficiary of the variable interest entity. The Company’s investments in privately-held companies are primarily non-marketable equity securities without readily determinable fair values. The Company accounts for its investments in privately-held companies either under equity method accounting or by adjusting the carrying value of its non-marketable equity securities to fair value upon observable transactions for identical or similar investments of the same issuer or upon impairment (referred to as the measurement alternative). All gains and losses on non-marketable equity securities, realized and unrealized, are recognized in other income (expense), net in the consolidated statements of operations. The Company periodically evaluates the carrying value of the investments in privately-held companies, when events and circumstances indicate that the carrying amount of the investment may not be recovered. The Company estimates the fair value of the investments to assess whether impairment losses shall be recorded using Level 3 inputs. These investments include the Company’s holdings in privately-held companies that are not exchange traded and therefore not supported with observable market prices; hence, the Company may determine the fair value by reviewing equity valuation reports, current financial results, long-term plans of the private companies, the amount of cash that the privately-held companies have on-hand, the ability to obtain additional financing and overall market conditions in which the private companies operate or based on the price observed from the most recent completed financing. Loss Contingencies The Company is currently involved in, and may in the future be involved in, legal proceedings, claims, investigations, and government inquiries and investigations arising in the ordinary course of business. The Company records a liability when it believes that it is both probable that a loss has been incurred and the amount or range can be reasonably estimated. Significant judgment is required to determine both probability and the estimated amount. The Company reviews these provisions on a quarterly basis and adjust these provisions accordingly to reflect the impact of negotiations, settlements, rulings, advice of legal counsel, and updated information. Operating and Finance Leases The Company has operating leases primarily for office space and data center facilities. The determination of whether an arrangement is a lease or contains a lease is made at inception by evaluating whether the arrangement conveys the right to use an identified asset and whether the Company obtains substantially all of the economic benefits from and has the ability to direct the use of the asset. Operating leases are included in operating lease right-of-use assets, operating lease liabilities, short-term, and operating lease liabilities, long-term on the Company’s consolidated balance sheets. With the exception of initial adoption of the new lease standard, where the Company’s incremental borrowing rate used was the rate on the adoption date (January 1, 2019), operating lease ROU assets and operating lease liabilities are recognized based on the present value of lease payments over the lease term at the lease commencement date. To determine the incremental borrowing rate used to calculate the present value of future lease payments, the Company uses information including the Company’s credit rating, interest rates of similar debt instruments of entities with comparable credit ratings, and Twitter, Inc.’s guarantee of certain leases in foreign jurisdictions, as applicable. Certain lease agreements contain options for the Company to renew a lease for a term of up to ten years or an option to terminate a lease early within one year. The Company considers these options, which may be elected at the Company’s sole discretion, in determining the lease term on a lease-by-lease basis. Leases with an initial term of twelve months or less are not recognized on the consolidated balance sheets. The Company recognizes lease expense for these leases on a straight-line basis over the term of the lease. The Company also has server and networking equipment lease arrangements with original lease terms ranging from three four The Company’s lease agreements generally do not contain any material residual value guarantees or material restrictive covenants. Certain of the Company’s leases contain free or escalating rent payment terms. Additionally, certain lease agreements contain lease components (for example, fixed payments such as rent) and non-lease components such as common-area maintenance costs. For each asset class of the Company’s leases—real estate offices, data centers, and equipment—the Company has elected to account for both of these provisions as a single lease component. For arrangements accounted for as a single lease component, there may be variability in future lease payments as the amount of the non-lease components is typically revised from one period to the next. These variable lease payments, which are primarily comprised of common-area maintenance, utilities, and real estate taxes that are passed on from the lessor in proportion to the space leased by the Company, are recognized in operating expenses in the period in which the obligation for those payments was incurred. The Company recognizes lease expense for its operating leases in operating expenses on a straight-line basis over the term of the lease. The Company subleases certain leased office space to third parties when it determines there is excess leased capacity. Certain of these subleases contain both lease and non-lease components. The Company has elected to account for both of these provisions as a single lease component. Sublease rent income is recognized as an offset to operating expense on a straight-line basis over the lease term. In addition to sublease rent, variable non-lease costs such as common-area maintenance, utilities, and real estate taxes are charged to subtenants over the duration of the lease for their proportionate share of these costs. These variable non-lease income receipts are recognized in operating expenses as a reduction to costs incurred by the Company in relation to the head lease. Cash, Cash Equivalents and Investments The Company invests its excess cash primarily in short-term fixed income securities, including government and investment-grade debt securities and money market funds. The Company classifies all liquid investments with stated maturities of three months or less from date of purchase as cash equivalents. The Company classifies all marketable securities for use in current operations, even if the security matures beyond 12 months, and presents them as short-term investments in the consolidated balance sheets. As of December 31, 2019 and 2018, the Company has restricted cash balances of $1.9 million and $1.7 million, respectively, within prepaid expenses and other current assets and $26.7 million and $25.7 million, respectively, in other assets on the accompanying consolidated balance sheets based upon the term of the remaining restrictions. These restricted cash balances are primarily cash deposits to back letters of credit related to certain property leases. The Company determines the appropriate classification of its investments in marketable securities at the time of purchase and reevaluates such designation at each balance sheet date. The Company has classified and accounted for its marketable securities as available-for-sale. After considering the Company’s capital preservation objectives, as well as its liquidity requirements, the Company may sell securities prior to their stated maturities. The Company carries its available-for-sale securities at fair value, and reports the unrealized gains and losses, net of taxes, as a component of stockholders’ equity, except for unrealized losses determined to be other-than-temporary which are recorded as other income (expense), net. The Company determines any realized gains or losses on the sale of marketable securities on a specific identification method and records such gains and losses as a component of other income (expense), net. Interest earned on cash, cash equivalents, and marketable securities was $157.7 million, $111.2 million, and $44.4 million during the years ended December 31, 2019, 2018 and 2017, respectively. These balances are recorded in interest income in the accompanying consolidated statements of operations. The Company evaluates the investments periodically for possible other-than-temporary impairment. A decline in fair value below the amortized costs of debt securities is considered an other-than-temporary impairment if the Company has the intent to sell the security or it is more likely than not that the Company will be required to sell the security before recovery of the entire amortized cost basis. In those instances, an impairment charge equal to the difference between the fair value and the amortized cost basis is recognized in earnings. Regardless of the Company’s intent or requirement to sell a debt security, impairment is considered other-than-temporary if the Company does not expect to recover the entire amortized cost basis. Concentration of Credit Risk Financial instruments that potentially subject the Company to significant concentration of credit risk consist primarily of cash, cash equivalents, short-term investments and accounts receivable. The primary focus of the Company’s investment strategy is to preserve capital and meet liquidity requirements. The Company’s investment policy addresses the level of credit exposure by limiting the concentration in any one corporate issuer or sector and establishing a minimum allowable credit rating. To manage the risk exposure, the Company invests cash equivalents and short-term investments in a variety of fixed income securities, including government and investment-grade debt securities and money market funds. The Company places its cash primarily in checking and money market accounts with reputable financial institutions. Deposits held with these financial institutions may exceed the amount of insurance provided on such deposits, if any. The Company’s accounts receivable are typically unsecured and are derived from customers around the world in different industries. The Company includes terms in its contracts providing the ability to stop transferring promised goods or services, performs ongoing credit evaluations of its customers, and maintains allowances for potential credit losses. Historically, such losses have been within management’s expectations. As of December 31, 2019 and 2018, no single customer accounted for more than 10% of the Company’s net accounts receivable balance. No single customer accounted for more than 10% of the Company’s revenue in the years ended December 31, 2019, 2018 and 2017. The Company’s note hedge transactions, entered into in connection with the Convertible Notes, as defined and further described in Note 5 – Fair Value Measurements, and its derivative financial instruments expose the Company to credit risk to the extent that its counterparties may be unable to meet the terms of the transactions. The Company mitigates this risk by limiting its counterparties to major financial institutions and using multiple financial institutions as counterparties in its hedge transactions. Accounts Receivable, Net The Company records accounts receivable at the invoiced amount. The Company maintains an allowance for doubtful accounts to reserve for potentially uncollectible receivable amounts. In evaluating the Company’s ability to collect outstanding receivable balances, the Company considers various factors including the age of the balance, the creditworthiness of the customer, which is assessed based on ongoing credit evaluations and payment history, and the customer’s current financial condition. Property and Equipment, Net Property and equipment are stated at cost and depreciated using the straight-line method over the estimated useful lives of the assets. Leasehold improvements are amortized using the straight-line method over the shorter of the lease term or the estimated useful life. The estimated useful lives of property and equipment are described below: Property and Equipment Estimated Useful Life Computer hardware, networking and office equipment Three Computer software Up to five Furniture and fixtures Five years Leasehold improvements Lesser of estimated useful life or remaining lease term The Company reviews the remaining estimated useful lives of its property and equipment on an ongoing basis. Management is required to use judgment in determining the estimated useful lives of such assets. Changes in circumstances such as technological advances, changes to the Company’s business model, changes in the Company’s business strategy, or changes in the planned use of property and equipment could result in the actual useful lives differing from the Company’s current estimates. In cases where the Company determines that the estimated useful life of property and equipment should be shortened or extended, the Company would apply the new estimated useful life prospectively. The Company reviews property and equipment for impairment when events or circumstances indicate the carrying amount may not be recoverable. Costs of maintenance and repairs that do not improve or extend the lives of the respective assets are expensed as incurred. Upon retirement or sale, the cost and related accumulated depreciation are removed from the balance sheet and the resulting gain or loss is reflected in operating expenses. Capitalization of Interest Interest costs are capitalized for assets that are constructed for the Company’s own internal use, including internally developed software and property and equipment, for the period of time to get them ready for their intended use. During the years ended December 31, 2019, 2018 and 2017, the Company capitalized $4.6 million, $3.7 million and $3.6 million of interest expense, respectively. Goodwill Goodwill represents the excess of the purchase price over the fair value of the net tangible and intangible assets acquired in a business combination. Goodwill is not amortized, but is tested for impairment at least annually or more frequently if events or changes in circumstances indicate that the asset may be impaired. The Company’s impairment tests are based on a single operating segment and reporting unit structure. If the carrying value of the reporting unit exceeds its fair value, an impairment charge is recognized for the excess of the carrying value of the reporting unit over its fair value. The Company conducted its annual goodwill impairment test during the fourth quarter of 2019 and determined that the fair value of the reporting unit significantly exceeded its carrying value. As such, goodwill was not impaired. No impairment charge was recorded in any of the periods presented in the accompanying consolidated financial statements. Intangible Assets Intangible assets are carried at cost and amortized on a straight-line basis over their estimated useful lives of up to eleven years. The Company reviews identifiable amortizable intangible assets to be held and used for impairment whenever events or changes in circumstances indicate that the carrying value of the assets may not be recoverable. Determination of recoverability is based on the lowest level of identifiable estimated undiscounted cash flows resulting from use of the asset and its eventual disposition. Measurement of any impairment loss is based on the excess of the carrying value of the asset over its fair value. There have been no impairment charges recorded in any of the periods presented in the accompanying consolidated financial statements. Fair Value Measurements The Company classifies and discloses assets and liabilities measured at fair value on a recurring basis, as well as fair value measurements of assets and liabilities measured on a nonrecurring basis in periods subsequent to initial measurement, in a three-tier fair value hierarchy as described below. Fair value is defined as the exchange price that would be received for an asset or paid to transfer a liability in the principal or most advantageous market for the asset or liability in an orderly transaction between market participants on the measurement date. Valuation techniques used to measure fair value must maximize the use of observable inputs and minimize the use of unobservable inputs. The three levels of inputs that may be used to measure fair value are as follows: Level 1—Observable inputs, such as quoted prices in active markets for identical assets or liabilities. Level 2—Observable inputs other than Level 1 prices, such as quoted prices for similar assets or liabilities, quoted prices in markets that are not active or other inputs that are observable or can be corroborated by observable market data for substantially the full term of the assets or liabilities. Level 3—Unobservable inputs that are supported by little or no market activity and that are significant to the fair value of the assets or liabilities. Internal Use Software and Website Development Costs The Company capitalizes certain costs incurred in developing software programs or websites for internal use. In the years ended December 31, 2019, 2018 and 2017, the Company capitalized costs totaling approximately $127.5 million, $121.0 million and $113.9 million, respectively. Capitalized internal use software development costs are included in property and equipment, net. Included in the capitalized amounts above are $37.5 million, $41.4 million and $51.8 million of stock-based compensation expense in the years ended December 31, 2019, 2018 and 2017, respectively. The estimated useful life of costs capitalized is evaluated for each specific project and is up to five years. In the years ended December 31, 2019, 2018 and 2017, the amortization of capitalized costs totaled approximately $116.0 million, $111.8 million and $96.5 million, respectively. Income Taxes The Company is subject to income taxes in the United States and several foreign jurisdictions. Significant judgment is required in determining its provision (benefit) for in

Revenue

Revenue 12 Months Ended
Dec. 31, 2019
Revenue from Contract with Customer [Abstract]
Revenue Revenue Adoption of ASC Topic 606, "Revenue from Contracts with Customers" On January 1, 2018, the Company adopted Topic 606 using the modified retrospective method applied to those contracts not yet substantially completed as of January 1, 2018. Results for reporting periods beginning after January 1, 2018 are presented under the new revenue standard, while prior period amounts are not adjusted and continue to be reported in accordance with the Company's historical accounting policies and practices. Revenue Recognition Revenue is recognized when the control of promised goods or services is transferred to customers at an amount that reflects the consideration to which the Company expects to be entitled to in exchange for those goods or services. The Company identifies its contracts with customers and all performance obligations within those contracts. The Company then determines the transaction price and allocates the transaction price to the performance obligations within the Company's contracts with customers, recognizing revenue when, or as the Company satisfies its performance obligations. While the majority of the Company's revenue transactions are based on standard business terms and conditions, the Company also enters into sales agreements with advertisers and data partners that sometimes involve multiple performance obligations and occasionally include non-standard terms or conditions. Revenue by geography is based on the billing address of the customers. The following table sets forth revenue by services and revenue by geographic area (in thousands): Year Ended December 31, 2019 2018 2017 (1) Revenue by services: Advertising services $ 2,993,392 $ 2,617,397 $ 2,109,987 Data licensing and other 465,937 424,962 333,312 Total revenue $ 3,459,329 $ 3,042,359 $ 2,443,299 Year Ended December 31, 2019 2018 2017 (1) Revenue by geographic area: United States $ 1,944,022 $ 1,642,259 $ 1,413,614 Japan 537,021 507,970 343,741 Rest of World 978,286 892,130 685,944 Total revenue $ 3,459,329 $ 3,042,359 $ 2,443,299 (1) Amounts prior to January 1, 2018 have not been adjusted due to adoption of the new revenue standard under the modified retrospective method. Impact of Adoption The Company recorded a net reduction to opening accumulated deficit of $12.1 million, an increase to unbilled revenue of $8.0 million, and a reduction to deferred revenue of $4.1 million as of January 1, 2018 due to the cumulative impact of adopting Topic 606, with the impact primarily related to its data licensing arrangements. As a result of applying the new standard, the impact for the year ended December 31, 2018 was an increase to revenue of $16.1 million, an increase to unbilled revenue of $12.6 million, and a reduction to deferred revenue of $3.5 million, with the impact primarily related to the Company’s data licensing arrangements. Practical Expedients and Exemptions The Company expenses sales commissions as incurred when the amortization period is one year or less. Sales commission expenses are recorded within sales and marketing in the consolidated statements of operations. The Company applied the practical expedient to not disclose the value of remaining performance obligations not yet satisfied as of period end for contracts with an original expected duration of one year or less. The Company applied the practical expedient to not disclose the value of remaining performance obligations not yet satisfied as of period end for variable consideration in the form of sales-based royalties promised in exchange for licenses to its intellectual property in data licensing contracts. Contract Balances The Company enters into contracts with its customers, which may give rise to contract liabilities (deferred revenue) and contract assets (unbilled revenue). The payment terms and conditions within the Company’s contracts vary by the type and location of its customer and products or services purchased, the substantial majority of which are due in less than one year. When the timing of revenue recognition differs from the timing of payments made by customers, the Company recognizes either unbilled revenue (its performance precedes the billing date) or deferred revenue (customer payment is received in advance of performance). Unbilled Revenue (Contract Assets) The Company presents unbilled revenue in the consolidated balance sheets within prepaid expenses and other current assets and within other assets. The Company’s contracts do not contain material financing components. The Company's unbilled revenue primarily consists of amounts that have yet to be billed under contracts with escalating fee structures. Specifically, because the Company generally recognizes revenue on a straight-line basis for data licensing arrangements with escalating fee structures, revenue recognized represents amounts to which the Company is contractually entitled; however, the revenue recognized exceeds the amounts the Company has a right to bill as of the period end, thus resulting in unbilled revenue. Deferred Revenue (Contract Liabilities) The Company presents deferred revenue primarily within accrued and other current liabilities in the consolidated balance sheets and there is not expected to be any material non-current contract liabilities given the Company's contracting provisions. The Company's deferred revenue balance primarily consists of cash payments due in advance of satisfying its performance obligations relating to data licensing contracts and performance obligations given to customers based on their spend relating to advertising contracts, for which the Company defers, as they represent material rights. The Company recognizes deferred revenue relating to its data licensing contracts on a straight-line basis over the period in which the Company provides data. The Company recognizes deferred revenue relating to its advertising contracts based on the amount of customer spend and the relative standalone selling price of the material rights. The following table presents contract balances (in thousands): December 31, December 31, Unbilled Revenue $ 27,691 $ 20,786 Deferred Revenue $ 69,000 $ 38,949 The amount of revenue recognized in the year ended December 31, 2019 that was included in the deferred revenue balance as of December 31, 2018 was $38.9 million. The amount of revenue recognized in the year ended December 31, 2018 that was included in the deferred revenue balance as of January 1, 2018 was $25.9 million. This revenue consists primarily of revenue recognized as a result of the utilization of bonus media inventory earned by and material rights provided to customers in prior periods and the satisfaction of the Company’s performance obligations relating to data licensing contracts with advance cash payments. The amount of revenue recognized from obligations satisfied (or partially satisfied) in prior periods was not material. The increase in unbilled revenue balance from December 31, 2018 to December 31, 2019 was primarily attributable to differences between revenue recognized and amounts billed in the Company's data licensing arrangements with escalating fee structures due to recognizing such fees as revenue on a straight-line basis. The increase in deferred revenue balance from December 31, 2018 to December 31, 2019 was primarily due to cash payments received or due in advance of satisfying the Company’s performance obligations for data licensing contracts and bonus and make good media inventory earned by and offered to customers during the period. Remaining Performance Obligations As of December 31, 2019, the aggregate amount of the transaction price allocated to remaining performance obligations in contracts with an original expected duration exceeding one year is $634.7 million. This total amount primarily consists of long-term data licensing contracts and excludes deferred revenue related to the Company’s short-term advertising service arrangements. The Company expects to recognize this amount as revenue over the following time periods (in thousands): Remaining Performance Obligations 2020 2021 2022 and Thereafter Revenue expected to be recognized on remaining performance obligations $ 634,724 $ 262,674 $ 190,475 $ 181,575

Cash, Cash Equivalents and Shor

Cash, Cash Equivalents and Short-term Investments 12 Months Ended
Dec. 31, 2019
Cash and Cash Equivalents [Abstract]
Cash, Cash Equivalents and Short-term Investments Cash, Cash Equivalents and Short-term Investments Cash, cash equivalents and short-term investments consist of the following (in thousands): December 31, December 31, Cash and cash equivalents: Cash $ 254,405 $ 229,924 Money market funds 465,158 861,206 Corporate notes, commercial paper and certificates of deposit 1,079,519 803,314 Total cash and cash equivalents $ 1,799,082 $ 1,894,444 Short-term investments: U.S. government and agency securities including treasury bills $ 660,860 $ 1,053,408 Corporate notes, commercial paper and certificates of deposit 4,179,110 3,261,549 Total short-term investments $ 4,839,970 $ 4,314,957 The contractual maturities of securities classified as available-for-sale as of December 31, 2019 were as follows (in thousands): December 31, Due within one year $ 2,810,876 Due after one year through five years 2,029,094 Total $ 4,839,970 The following tables summarize unrealized gains and losses related to available-for-sale securities classified as short-term investments on the Company’s consolidated balance sheets (in thousands): December 31, 2019 Gross Gross Gross Aggregated U.S. government and agency securities including treasury bills $ 660,361 $ 1,049 $ (550) $ 660,860 Corporate notes, commercial paper and certificates of deposit 4,166,203 13,133 (226) 4,179,110 Total available-for-sale securities classified as short-term investments $ 4,826,564 $ 14,182 $ (776) $ 4,839,970 December 31, 2018 Gross Gross Gross Aggregated U.S. government and agency securities including treasury bills $ 1,053,988 $ 41 $ (621) $ 1,053,408 Corporate notes, commercial paper and certificates of deposit 3,265,012 713 (4,176) 3,261,549 Total available-for-sale securities classified as short-term investments $ 4,319,000 $ 754 $ (4,797) $ 4,314,957 The available-for-sale securities classified as cash and cash equivalents on the consolidated balance sheets are not included in the tables above as the gross unrealized gains and losses were immaterial for each period. Their carrying value approximates fair value because of the short maturity period of these instruments. The gross unrealized loss on securities in a continuous loss position for 12 months or longer was not material as of December 31, 2019 and 2018. Investments are reviewed periodically to identify possible other-than-temporary impairments. No impairment loss has been recorded on the securities included in the tables above as the Company believes that the decrease in fair value of these securities is temporary and expects to recover the initial cost of investment for these securities.

Fair Value Measurements

Fair Value Measurements 12 Months Ended
Dec. 31, 2019
Fair Value Disclosures [Abstract]
Fair Value Measurements Fair Value Measurements The Company measures its cash equivalents, short-term investments and derivative financial instruments at fair value. The Company classifies its cash equivalents, short-term investments and derivative financial instruments within Level 1 or Level 2 because the Company values these investments using quoted market prices or alternative pricing sources and models utilizing market observable inputs. The fair value of the Company’s Level 1 financial assets is based on quoted market prices of the identical underlying security. The fair value of the Company’s Level 2 financial assets is based on inputs that are directly or indirectly observable in the market, including the readily-available pricing sources for the identical underlying security that may not be actively traded. The following tables set forth the fair value of the Company’s financial assets and liabilities measured at fair value on a recurring basis as of December 31, 2019 and 2018 based on the three-tier fair value hierarchy (in thousands): December 31, 2019 Level 1 Level 2 Total Assets Cash equivalents: Money market funds $ 465,158 $ — $ 465,158 Corporate notes — 8,246 8,246 Commercial paper — 1,031,825 1,031,825 Certificates of deposit — 39,448 39,448 Short-term investments: U.S. government and agency securities — 660,860 660,860 Corporate notes — 2,468,429 2,468,429 Commercial paper — 1,236,487 1,236,487 Certificates of deposit — 474,194 474,194 Other current assets: Foreign currency contracts — 3,756 3,756 Total $ 465,158 $ 5,923,245 $ 6,388,403 Liabilities Other current liabilities: Foreign currency contracts — 1,573 1,573 Total $ — $ 1,573 $ 1,573 December 31, 2018 Level 1 Level 2 Total Assets Cash equivalents: Money market funds $ 861,206 $ — $ 861,206 Corporate notes — 24,537 24,537 Commercial paper — 778,777 778,777 Short-term investments: Treasury bills — 294,128 294,128 U.S. government and agency securities — 759,280 759,280 Corporate notes — 1,713,835 1,713,835 Commercial paper — 733,999 733,999 Certificates of deposit — 813,715 813,715 Other current assets: Foreign currency contracts — 1,343 1,343 Total $ 861,206 $ 5,119,614 $ 5,980,820 Liabilities Other current liabilities: Foreign currency contracts — 3,826 3,826 Total $ — $ 3,826 $ 3,826 The Company has $954.0 million in aggregate principal amount of 1.00% convertible senior notes due in 2021, or the 2021 Notes, $1.15 billion in aggregate principal amount of 0.25% convertible senior notes due in 2024, or the 2024 Notes, and, taken together with the 2021 Notes, the Convertible Notes, and $700.0 million in aggregate principal amount of 3.875% senior notes due in 2027, or the 2027 Notes, and, together with the 2021 Notes and the 2024 Notes, the Notes, outstanding as of December 31, 2019. Refer to Note 11 – Senior Notes and Convertible Notes for further details on the Notes. The estimated fair value of the 2021 Notes, 2024 Notes and 2027 Notes, based on a market approach as of December 31, 2019 was approximately $927.9 million, $1.13 billion, and $700.0 million, respectively, which represents a Level 2 valuation. The estimated fair value was determined based on the estimated or actual bids and offers of the Notes in an over-the-counter market on the last business day of the period. Derivative Financial Instruments The Company enters into foreign currency forward contracts with financial institutions to reduce the risk that its earnings may be adversely affected by the impact of exchange rate fluctuations on monetary assets or liabilities denominated in currencies other than the functional currency of a subsidiary. These contracts do not subject the Company to material balance sheet risk due to exchange rate movements because gains and losses on these derivatives are intended to offset gains and losses on the hedged foreign currency denominated assets and liabilities. These foreign currency forward contracts are not designated as hedging instruments. The Company recognizes these derivative instruments as either assets or liabilities in the consolidated balance sheets at fair value based on a Level 2 valuation. The Company records changes in the fair value (i.e., gains or losses) of the derivatives in other income (expense), net in the consolidated statements of operations. The notional principal of foreign currency contracts outstanding was equivalent to $456.1 million and $545.3 million at December 31, 2019 and 2018, respectively. The fair values of outstanding derivative instruments for the periods presented on a gross basis are as follows (in thousands): Balance Sheet Location December 31, December 31, Assets Foreign currency contracts not designated as hedging instruments Other current assets $ 3,756 $ 1,343 Liabilities Foreign currency contracts not designated as hedging instruments Other current liabilities $ 1,573 $ 3,826

Property and Equipment, Net

Property and Equipment, Net 12 Months Ended
Dec. 31, 2019
Property, Plant and Equipment [Abstract]
Property and Equipment, Net Property and Equipment, Net The following table presents the detail of property and equipment, net for the periods presented (in thousands): December 31, December 31, Property and equipment, net Equipment $ 1,445,003 $ 1,185,270 Furniture and leasehold improvements 347,983 328,532 Capitalized software 688,894 554,962 Construction in progress 100,551 96,488 Total 2,582,431 2,165,252 Less: Accumulated depreciation and amortization (1,550,650) (1,280,174) Property and equipment, net $ 1,031,781 $ 885,078 Depreciation expense totaled $449.0 million, $406.5 million, and $349.3 million for the years ended December 31, 2019, 2018 and 2017, respectively. Included in these amounts were depreciation expense for server and networking equipment acquired under finance leases in the amount of $63.7 million, $84.2 million, and $93.6 million for the years ended December 31, 2019, 2018 and 2017, respectively.

Operating and Finance Leases

Operating and Finance Leases 12 Months Ended
Dec. 31, 2019
Leases [Abstract]
Operating and Finance Leases Operating and Finance Leases The Company’s leases have remaining lease terms from less than one year up to approximately eleven years. As of December 31, 2019, assets recorded under finance leases were $126.0 million and accumulated depreciation associated with finance leases was $104.2 million, recorded in property and equipment, net on the consolidated balance sheets. The components of lease cost for the year ended December 31, 2019 were as follows (in thousands): Year Ended 2019 Operating lease cost $ 173,005 Finance lease cost Depreciation expense 63,674 Interest on lease liabilities 2,125 Total finance lease cost 65,799 Short-term lease cost 3,000 Variable lease cost 49,456 Sublease income (22,326) Total lease cost $ 268,934 Other information related to leases was as follows (in thousands): Year Ended 2019 Supplemental Cash Flows Information Cash paid for amounts included in the measurement of lease liabilities: Operating cash flows from operating leases $ 165,093 Operating cash flows from finance leases $ 2,125 Financing cash flows from finance leases $ 66,677 Right-of-use assets obtained in exchange for lease obligations: Operating leases $ 110,522 Finance leases $ — December 31, Lease Term and Discount Rate Weighted-average remaining lease term (years): Operating leases 6.6 Finance leases 0.7 Weighted-average discount rate: Operating leases 4.3 % Finance leases 3.7 % Future lease payments under leases and sublease income as of December 31, 2019 were as follows (in thousands): Operating Finance Total Sublease Year Ending December 31, 2020 $ 180,183 $ 23,845 $ 204,028 $ (11,704) 2021 168,456 569 169,025 (8,771) 2022 153,244 — 153,244 (1,318) 2023 115,047 — 115,047 — 2024 111,615 — 111,615 — Thereafter 421,013 — 421,013 — Total future lease payments (receipts) 1,149,558 24,414 1,173,972 $ (21,793) Less: leases not yet commenced (269,886) — (269,886) Less: imputed interest (123,468) (733) (124,201) Total lease liabilities $ 756,204 $ 23,681 $ 779,885 Reconciliation of lease liabilities as shown in the consolidated balance sheets Operating lease liabilities, short-term $ 146,959 $ — $ 146,959 Operating lease liabilities, long-term 609,245 — 609,245 Finance lease liabilities, short-term — 23,476 23,476 Finance lease liabilities, long-term — 205 205 Total lease liabilities $ 756,204 $ 23,681 $ 779,885 As of December 31, 2019, the Company had additional operating leases representing a gross commitment of approximately $267.4 million which primarily relate to data center leases that have not yet commenced. These operating leases are expected to commence in 2020 and will have lease terms of between one Future lease payments under leases and sublease income as of December 31, 2018 were as follows (in thousands): Operating Sublease Finance Year Ending December 31, 2019 $ 161,932 $ (24,312) $ 70,506 2020 151,751 (15,144) 23,845 2021 110,853 (11,762) 569 2022 89,398 (1,319) — 2023 62,137 — — Thereafter 263,441 — — $ 839,512 $ (52,537) 94,920 Less: Amounts representing interest 2,480 Total finance lease obligation 92,440 Less: Short-term portion 68,046 Long-term portion $ 24,394
Operating and Finance Leases Operating and Finance Leases The Company’s leases have remaining lease terms from less than one year up to approximately eleven years. As of December 31, 2019, assets recorded under finance leases were $126.0 million and accumulated depreciation associated with finance leases was $104.2 million, recorded in property and equipment, net on the consolidated balance sheets. The components of lease cost for the year ended December 31, 2019 were as follows (in thousands): Year Ended 2019 Operating lease cost $ 173,005 Finance lease cost Depreciation expense 63,674 Interest on lease liabilities 2,125 Total finance lease cost 65,799 Short-term lease cost 3,000 Variable lease cost 49,456 Sublease income (22,326) Total lease cost $ 268,934 Other information related to leases was as follows (in thousands): Year Ended 2019 Supplemental Cash Flows Information Cash paid for amounts included in the measurement of lease liabilities: Operating cash flows from operating leases $ 165,093 Operating cash flows from finance leases $ 2,125 Financing cash flows from finance leases $ 66,677 Right-of-use assets obtained in exchange for lease obligations: Operating leases $ 110,522 Finance leases $ — December 31, Lease Term and Discount Rate Weighted-average remaining lease term (years): Operating leases 6.6 Finance leases 0.7 Weighted-average discount rate: Operating leases 4.3 % Finance leases 3.7 % Future lease payments under leases and sublease income as of December 31, 2019 were as follows (in thousands): Operating Finance Total Sublease Year Ending December 31, 2020 $ 180,183 $ 23,845 $ 204,028 $ (11,704) 2021 168,456 569 169,025 (8,771) 2022 153,244 — 153,244 (1,318) 2023 115,047 — 115,047 — 2024 111,615 — 111,615 — Thereafter 421,013 — 421,013 — Total future lease payments (receipts) 1,149,558 24,414 1,173,972 $ (21,793) Less: leases not yet commenced (269,886) — (269,886) Less: imputed interest (123,468) (733) (124,201) Total lease liabilities $ 756,204 $ 23,681 $ 779,885 Reconciliation of lease liabilities as shown in the consolidated balance sheets Operating lease liabilities, short-term $ 146,959 $ — $ 146,959 Operating lease liabilities, long-term 609,245 — 609,245 Finance lease liabilities, short-term — 23,476 23,476 Finance lease liabilities, long-term — 205 205 Total lease liabilities $ 756,204 $ 23,681 $ 779,885 As of December 31, 2019, the Company had additional operating leases representing a gross commitment of approximately $267.4 million which primarily relate to data center leases that have not yet commenced. These operating leases are expected to commence in 2020 and will have lease terms of between one Future lease payments under leases and sublease income as of December 31, 2018 were as follows (in thousands): Operating Sublease Finance Year Ending December 31, 2019 $ 161,932 $ (24,312) $ 70,506 2020 151,751 (15,144) 23,845 2021 110,853 (11,762) 569 2022 89,398 (1,319) — 2023 62,137 — — Thereafter 263,441 — — $ 839,512 $ (52,537) 94,920 Less: Amounts representing interest 2,480 Total finance lease obligation 92,440 Less: Short-term portion 68,046 Long-term portion $ 24,394

Goodwill and Intangible Assets

Goodwill and Intangible Assets 12 Months Ended
Dec. 31, 2019
Goodwill and Intangible Assets Disclosure [Abstract]
Goodwill and Intangible Assets Goodwill and Intangible Assets The following table presents the goodwill activities for the periods presented (in thousands): Goodwill Balance as of December 31, 2018 $ 1,227,269 Acquisition 27,428 Other 2,002 Balance as of December 31, 2019 $ 1,256,699 For each of the periods presented, gross goodwill balance equaled the net balance since no impairment charges have been recorded. The following table presents the detail of intangible assets for the periods presented (in thousands): Gross Carrying Accumulated Net Carrying December 31, 2019: Patents and developed technologies $ 96,636 $ (41,530) $ 55,106 Total $ 96,636 $ (41,530) $ 55,106 December 31, 2018: Patents and developed technologies $ 93,211 $ (48,806) $ 44,405 Publisher and advertiser relationships 9,300 (8,680) 620 Total $ 102,511 $ (57,486) $ 45,025 Patents and developed technologies are amortized over a period of up to eleven years from the respective purchase dates. Amortization expense associated with intangible assets for the years ended December 31, 2019, 2018 and 2017 was $16.5 million, $19.0 million and $46.5 million, respectively. During the year ended December 31, 2019, $32.5 million in gross carrying value and accumulated amortization related to fully-amortized intangible assets was eliminated. Estimated future amortization expense as of December 31, 2019 is as follows (in thousands): 2020 $ 16,210 2021 11,753 2022 6,733 2023 6,026 2024 6,026 Thereafter 8,358 Total $ 55,106

Accrued and Other Current Liabi

Accrued and Other Current Liabilities 12 Months Ended
Dec. 31, 2019
Payables and Accruals [Abstract]
Accrued and Other Current Liabilities Accrued and other current liabilities The following table presents the detail of accrued and other current liabilities for the periods presented (in thousands): December 31, December 31, Accrued compensation $ 190,465 $ 155,830 Accrued tax liabilities 45,967 39,729 Accrued publisher, content and ad network costs 45,265 33,014 Deferred revenue 68,987 38,949 Accrued other 150,209 138,229 Total $ 500,893 $ 405,751

Acquisitions and Other Investme

Acquisitions and Other Investments 12 Months Ended
Dec. 31, 2019
Business Combinations [Abstract]
Acquisitions and Other Investments Acquisitions and Other Investments 2019 Acquisitions During the year ended December 31, 2019, the Company made a number of acquisitions, which were accounted for as business combinations. The total purchase price of $34.5 million (paid in cash of $29.9 million and indemnification holdback of $4.6 million) for these acquisitions was allocated as follows: $9.0 million to developed technology, $1.9 million to net liabilities assumed based on their estimated fair value on the acquisition date, and the excess $27.4 million of the purchase price over the fair value of net assets acquired to goodwill. The goodwill from the acquisitions are mainly attributable to assembled workforce, expected synergies and other benefits. The goodwill is not tax deductible. Developed technologies will be amortized on a straight-line basis over their estimated useful lives of up to 36 months. The results of operations for these acquisitions have been included in the Company’s consolidated statements of operations since the date of acquisition. Actual and pro forma revenue and results of operations for these acquisitions have not been presented because they do not have a material impact on the consolidated revenue and results of operations. 2018 Acquisition During the year ended 2018, the Company acquired a company, which was accounted for as a business combination. The purchase price of $53.7 million (paid in shares of the Company’s common stock having a total fair value of $19.1 million and cash of $34.6 million) for this acquisition was allocated as follows: $9.3 million to developed technology, $0.4 million to net tangible assets acquired based on their estimated fair value on the acquisition date, and the excess $44.0 million of the purchase price over the fair value of net assets acquired to goodwill. The goodwill from the acquisition is mainly attributable to assembled workforce, expected synergies and other benefits. The goodwill is not tax deductible for U.S. income tax purposes. The developed technology is amortized on a straight-line basis over its estimated useful life of 24 months. The results of operations for this acquisition have been included in the Company’s consolidated statements of operations since the date of acquisition. Actual and pro forma revenue and results of operations for this acquisition have not been presented because they do not have a material impact on the consolidated revenue and results of operations. 2017 Acquisitions The Company did not complete any acquisitions during the year ended December 31, 2017. Investments in Privately-Held Companies The Company makes strategic investments in privately-held companies. The Company also evaluates each investee to determine if the investee is a variable interest entity and, if so, whether the Company is the primary beneficiary of the variable interest entity. The Company has determined, as of December 31, 2019, there were no variable interest entities required to be consolidated in the Company’s consolidated financial statements. The Company’s investments in privately-held companies are primarily non-marketable equity securities without readily determinable fair values. The Company accounts for its investments in privately-held companies either under equity method accounting or by adjusting the carrying value of its non-marketable equity securities to fair value upon observable transactions for identical or similar investments of the same issuer or upon impairment (referred to as the measurement alternative). All gains and losses on non-marketable equity securities, realized and unrealized, are recognized in other income (expense), net. The Company’s non-marketable equity securities had a combined carrying value of $77.7 million and $30.2 million as of December 31, 2019 and 2018, respectively. The maximum loss the Company can incur for its investments is their carrying value. These investments in privately-held companies are included within Other Assets on the consolidated balance sheets.

Senior Notes and Convertible No

Senior Notes and Convertible Notes 12 Months Ended
Dec. 31, 2019
Debt Disclosure [Abstract]
Senior Notes and Convertible Notes Senior Notes and Convertible Notes Senior Notes 2027 Notes In December 2019, the Company issued $700.0 million aggregate principal amount of the 3.875% senior notes due 2027, which we refer to as the 2027 Notes, in a private placement to qualified institutional buyers pursuant to Rule144A under the Securities Act of 1933, as amended, and outside the United States pursuant to Regulation S under the Securities Act of 1933. The total net proceeds from this offering were approximately $691.9 million, after deducting $8.1 million of debt issuance costs in connection with the issuance of the 2027 Notes. The 2027 Notes represent senior unsecured obligations of the Company. The interest rate is fixed at 3.875% per annum and is payable semi-annually in arrears on June 15 and December 15 of each year, which will commence on June 15, 2020. The Company may redeem the 2027 Notes, in whole or in part, at any time prior to September 15, 2027 at a price equal to 100% of the principal amount of the 2027 Notes plus a “make-whole” premium and accrued and unpaid interest, if any. On and after September 15, 2027, the Company may redeem the 2027 Notes at 100% of the principal amount plus accrued and unpaid interest, if any, to, but excluding, the redemption date. If the Company experiences a change of control triggering event (as defined in the Indenture), the Company must offer to repurchase the 2027 Notes at a repurchase price equal to 101% of the principal amount of the 2027 Notes to be repurchased, plus accrued and unpaid interest, if any, to the applicable repurchase date. Convertible Notes 2019 Notes, 2021 Notes and 2024 Notes In 2014, the Company issued $935.0 million aggregate principal amount of the 0.25% convertible senior notes due 2019, which we refer to as the 2019 Notes, and $954.0 million in aggregate principal amount of the 1.00% convertible senior notes due 2021, which we refer to as the 2021 Notes, in a private placement to qualified institutional buyers pursuant to Rule 144A of the Securities Act of 1933, as amended. The total net proceeds from this offering were approximately $1.86 billion, after deducting $28.3 million of debt discount and $0.5 million of debt issuance costs in connection with the issuance of the 2019 Notes and the 2021 Notes. On September 16, 2019, the Company repaid at maturity the $935.0 million of principal balance associated with its 2019 Notes. In 2018, the Company issued $1.15 billion aggregate principal amount of the 0.25% convertible senior notes due 2024, which we refer to as the 2024 Notes, and, when taken together with the 2021 Notes, the Convertible Notes, in a private placement to qualified institutional buyers pursuant to Rule144A under the Securities Act of 1933. The total net proceeds from this offering were approximately $1.14 billion, after deducting $12.3 million of debt issuance costs in connection with the 2024 Notes. The 2021 Notes and the 2024 Notes are senior unsecured obligations of the Company. The interest rate of the 2021 Notes is fixed at 1.00% per annum and is payable semi-annually in arrears on March 15 and September 15 of each year. The interest rate of the 2024 Notes is fixed at 0.25% per annum and is payable semi-annually in arrears on June 15 and December 15 of each year. Each $1,000 of principal of the 2021 Notes and the 2024 Notes will initially be convertible into 12.8793 and 17.5001 shares, respectively, of the Company’s common stock, which is equivalent to an initial conversion price of approximately $77.64 and $57.14 per share, respectively, in each case, subject to adjustment upon the occurrence of specified events set forth in the indenture governing such series. Holders of the 2021 Notes may convert their 2021 Notes at their option at any time until close of business on the second scheduled trading day immediately preceding the maturity date of March 15, 2021. Holders of the 2024 Notes may convert their 2024 Notes at their option at any time on or after March 15, 2024 until close of business on the second scheduled trading day immediately preceding the maturity date of June 15, 2024. Further, holders of the Convertible Notes may convert all or any portion of the notes of the applicable series at the option of such holder prior to the respective dates above, only under the following circumstances: 1) during any calendar quarter commencing after the calendar quarter ending on December 31, 2014, in the case of the 2021 Notes, and September 30, 2018, in the case of the 2024 Notes (and, in each case, only during such calendar quarter), if the last reported sale price of the common stock for at least 20 trading days (whether or not consecutive) during a period of 30 consecutive trading days ending on the last trading day of the immediately preceding calendar quarter is greater than or equal to 130% of the conversion price for the applicable series of Convertible Notes on each applicable trading day; 2) during the five business day period after any five consecutive trading day period (the “measurement period”) in which the trading price (as defined in the indenture governing the applicable series of Convertible Notes) per $1,000 principal amount of such series of Convertible Notes for each trading day of the applicable measurement period was less than 98% of the product of the last reported sale price of Twitter’s common stock and the conversion rate for the applicable series of Convertible Notes on each such trading day; or 3) upon the occurrence of certain specified corporate events. Upon conversion of the 2021 Notes and 2024 Notes, the Company will pay or deliver, as the case may be, cash, shares of its common stock or a combination of cash and shares of its common stock, at the Company’s election. If the Company satisfies its conversion obligation solely in cash or through payment and delivery, as the case may be, of a combination of cash and shares of its common stock, the amount of cash and shares of common stock, if any, due upon conversion of the 2021 Notes or the 2024 Notes, as applicable, will be based on a daily conversion value (as defined in the indenture governing the applicable series of Convertible Notes) calculated on a proportionate basis for each trading day in the applicable 30 trading day observation period. If a fundamental change (as defined in the indenture governing the applicable series of Convertible Notes) occurs prior to the applicable maturity date, holders of the 2021 Notes and 2024 Notes, as applicable, may require the Company to repurchase all or a portion of their notes for cash at a repurchase price equal to 100% of the principal amount of such notes, plus any accrued and unpaid interest to, but excluding, the repurchase date of such series of notes. In addition, if specific corporate events occur prior to the applicable maturity date of the 2021 Notes or the 2024 Notes, the Company will be required to increase the conversion rate for holders who elect to convert their notes in connection with such corporate events. In accordance with accounting guidance on embedded conversion features, the Company valued and bifurcated the conversion option associated with the 2021 Notes and the 2024 Notes from the respective host debt instrument, which is referred to as debt discount, and initially recorded the conversion option of $283.3 million for the 2021 Notes and $255.0 million for the 2024 Notes in stockholders’ equity. The resulting debt discount on the 2021 Notes and the 2024 Notes is amortized to interest expense at an effective interest rate of 6.25% and 4.46%, respectively, over the contractual terms of these notes. The Company allocated $2.8 million of debt issuance costs to the equity component and the remaining $9.8 million of debt issuance costs are amortized to interest expense under the effective interest rate method over the contractual terms of these notes. Concurrent with the offering of the 2021 Notes in 2014 and the 2024 Notes in 2018, the Company entered into convertible note hedge transactions with certain bank counterparties whereby the Company has the option to purchase initially (subject to adjustment for certain specified events) a total of approximately 12.3 million and 20.1 million shares, respectively, of its common stock at a price of approximately $77.64 and $57.14 per share, respectively. The total cost of the convertible note hedge transactions was $233.5 million and $268.0 million, respectively. In addition, the Company sold warrants to certain bank counterparties whereby the holders of the warrants have the option to purchase initially (subject to adjustment for certain specified events) a total of approximately 12.3 million and 20.1 million shares, respectively, of the Company’s common stock at an initial strike price of $105.28 and $80.20 per share, respectively. The Company received $172.9 million and $186.8 million in cash proceeds from the sale of these warrants, respectively. Taken together, the purchase of the convertible note hedges and the sale of warrants in connection with the issuance of the Convertible Notes are intended to offset any actual dilution from the conversion of such notes and to effectively increase the overall conversion price from $77.64 to $105.28 per share, in the case of the 2021 Notes, and from $57.14 to $80.20 per share, in the case of the 2024 Notes. As these transactions meet certain accounting criteria, the convertible note hedges and warrants are recorded in stockholders’ equity and are not accounted for as derivatives. The net cost incurred in connection with the convertible note hedge and warrant transactions was recorded as a reduction to additional paid-in capital in the consolidated balance sheet as of December 31, 2019. The Notes consisted of the following (in thousands): December 31, 2019 December 31, 2018 2021 Notes 2024 Notes 2027 Notes 2019 Notes 2021 Notes 2024 Notes Principal amounts: Principal $ 954,000 $ 1,150,000 $ 700,000 $ 935,000 $ 954,000 $ 1,150,000 Unamortized debt discount and issuance costs (1) (84,652) (202,515) (8,033) (37,672) (130,232) (242,846) Net carrying amount $ 869,348 $ 947,485 $ 691,967 $ 897,328 $ 823,768 $ 907,154 Carrying amount of the equity component (2) $ 283,283 $ 254,981 $ — $ 222,826 $ 283,283 $ 254,981 (1) Included in the consolidated balance sheets within convertible notes and senior notes, and amortized over the remaining lives of the Notes. (2) Included in the consolidated balance sheets within additional paid-in capital. During the year ended December 31, 2019, 2018, and 2017, the Company recognized $123.6 million, $115.4 million and $88.5 million, respectively, of interest expense related to the amortization of debt discount and issuance costs prior to capitalization of interest. The Company recognized $15.7 million, $13.4 million, and $11.9 million of coupon interest expense in the years ended December 31, 2019, 2018, and 2017, respectively. As of December 31, 2019, the remaining life of the 2021 Notes, 2024 Notes and 2027 Notes is approximately 20 months, 53 months, and 95 months, respectively.

Net Income (Loss) Per Share

Net Income (Loss) Per Share 12 Months Ended
Dec. 31, 2019
Earnings Per Share [Abstract]
Net Income (Loss) Per Share Net Income (Loss) per Share Basic net income (loss) per share is computed by dividing total net income (loss) attributable to common stockholders by the weighted-average common shares outstanding. The weighted-average common shares outstanding is adjusted for shares subject to repurchase such as unvested restricted stock granted to employees in connection with acquisitions, contingently returnable shares and escrowed shares supporting indemnification obligations that are issued in connection with acquisitions and unvested stock options exercised. Diluted net income (loss) per share is computed by dividing the net income (loss) attributable to common stockholders by the weighted-average number of common shares outstanding including potential dilutive common stock instruments. In the year ended December 31, 2017, the Company’s potential common stock instruments such as stock options, RSUs, shares to be purchased under the 2013 Employee Stock Purchase Plan, shares subject to repurchases, conversion feature of the Convertible Notes and the warrants were not included in the computation of diluted loss per share as the effect of including these shares in the calculation would have been anti-dilutive. The following table presents the calculation of basic and diluted net loss per share for periods presented (in thousands, except per share data). Year Ended December 31, 2019 2018 2017 Basic net income (loss) per share: Numerator Net income (loss) $ 1,465,659 $ 1,205,596 $ (108,063) Denominator Weighted-average common shares outstanding 772,663 756,916 736,607 Weighted-average restricted stock subject to repurchase (1,934) (2,590) (3,905) Weighted-average shares used to compute basic net income (loss) per share 770,729 754,326 732,702 Basic net income (loss) per share attributable to common stockholders $ 1.90 $ 1.60 $ (0.15) Diluted net income (loss) per share: Numerator Net income (loss) $ 1,465,659 $ 1,205,596 $ (108,063) Denominator Number of shares used in basic computation 770,729 754,326 732,702 Weighted-average effect of dilutive securities: RSUs 10,468 13,285 — Stock options 2,496 2,686 — Other 1,838 2,389 — Weighted-average shares used to compute diluted net income (loss) per share 785,531 772,686 732,702 Diluted net income (loss) per share attributable to common stockholders $ 1.87 $ 1.56 $ (0.15) The following number of potential common shares at the end of each period were excluded from the calculation of diluted net income (loss) per share attributable to common stockholders because their effect would have been anti-dilutive for the periods presented (in thousands): Year Ended December 31, 2019 2018 2017 RSUs 12,117 14,949 33,123 Warrants 42,246 44,454 24,329 Stock options 3 837 4,793 Shares subject to repurchase and others 1,284 1,951 5,879 Since the Company expects to settle the principal amount of the outstanding Convertible Notes in cash, the Company uses the treasury stock method for calculating any potential dilutive effect of the conversion spread on diluted net income per share, if applicable. For the 2021 Notes, the conversion spread of 12.3 million shares will have a dilutive impact on diluted net income per share of common stock when the average market price of the Company’s common stock for a given period exceeds the conversion price of $77.64 per share. For the 2024 Notes, the conversion spread of 20.1 million shares will have a dilutive impact on diluted net income per share of common stock when the average market price of the Company’s common stock for a given period exceeds the conversion price of $57.14 per share. If the average market price of the common stock exceeds the exercise price of the warrants, $105.28 for the 2019 Notes and 2021 Notes, and $80.20 for the 2024 Notes, the warrants will have a dilutive effect on the earnings per share assuming that the Company is profitable. Since the average market price of the common stock is below $80.20 for all periods presented, the warrants are anti-dilutive.

Preferred Stock

Preferred Stock 12 Months Ended
Dec. 31, 2019
Temporary Equity Disclosure [Abstract]
Preferred Stock Preferred StockThe Company has the authority to issue up to 200,000,000 shares of preferred stock and to determine the price, rights, preferences, privileges and restrictions, including voting rights, of those shares without any further vote or action by the stockholders. As of December 31, 2019 and 2018, there was no preferred stock outstanding.

Common Stock and Stockholders'

Common Stock and Stockholders' Equity 12 Months Ended
Dec. 31, 2019
Stockholders' Equity Note [Abstract]
Common Stock and Stockholders' Equity Common Stock and Stockholders’ Equity Common Stock As of December 31, 2019, the Company is authorized to issue 5.0 billion shares of $0.000005 par value common stock in accordance with the Certificate of Incorporation, as amended and restated. Each share of common stock is entitled to one vote. The holders of common stock are also entitled to receive dividends whenever funds are legally available and when and if declared by the Board of Directors, subject to the prior rights of holders of all classes of stock outstanding. As of December 31, 2019, no dividends have been declared. Equity Incentive Plans The Company’s 2013 Equity Incentive Plan serves as the successor to the 2007 Equity Incentive Plan. Initially, 68.3 million shares were reserved under the 2013 Equity Incentive Plan and any shares subject to options or other similar awards granted under the 2007 Equity Incentive Plan that expire, are forfeited, are repurchased by the Company or otherwise terminate unexercised will become available under the 2013 Equity Incentive Plan. The number of shares of the Company’s common stock available for issuance under the 2013 Equity Incentive Plan were and will be increased on the first day of each fiscal year beginning with the 2014 fiscal year, in an amount equal to the least of (i) 60,000,000 Shares, (ii) 5% of the outstanding Shares on the last day of the immediately preceding fiscal year or (iii) such number of Shares determined by the Company’s Board of Directors. As of December 31, 2019, the total number of options, RSUs, and PRSUs outstanding under the 2013 Equity Incentive Plan was 34.1 million shares, and 198.4 million shares were available for future issuance. There were 2.2 million shares of options outstanding under the 2007 Equity Incentive Plan as of December 31, 2019. No additional shares have been issued under the 2007 Equity Incentive Plan since 2013. In addition, a total of 6.8 million shares were reserved and are available for grants under the Company's 2016 Equity Incentive Plan. As of December 31, 2019, no shares have been issued under the 2016 Equity Incentive Plan. Options granted under the Company’s Equity Incentive Plans generally expire 10 years after the grant date. The Company issues new shares to satisfy stock option exercises. The Company also assumed stock options of acquired entities in connection with certain acquisitions. While the respective stock plans were terminated on the closing of each acquisition, they continue to govern the terms of stock options assumed in the respective acquisition. Restricted Common Stock The Company has granted restricted common stock to certain continuing employees in connection with the acquisitions. Vesting of this stock is dependent on the respective employee’s continued employment at the Company during the requisite service period, which is up to four years from the issuance date, and the Company has the right to repurchase the unvested shares upon termination of employment. The fair value of the restricted common stock issued to employees is recorded as compensation expense on a straight-line basis over the requisite service period. The activities for the restricted common stock issued to employees for the year ended December 31, 2019 are summarized as follows (in thousands, except per share data): Number of Weighted-Average Unvested restricted common stock at December 31, 2018 2,238 $ 19.50 Granted 471 $ 33.90 Vested (1,278) $ 19.49 Canceled (3) $ 18.23 Unvested restricted common stock at December 31, 2019 1,428 $ 24.26 Employee Stock Purchase Plan On November 7, 2013, the Company’s 2013 Employee Stock Purchase Plan (the “ESPP”) became effective. The ESPP allows eligible employees to purchase shares of the Company’s common stock at a discount through payroll deductions of up to 15% of their eligible compensation, subject to any plan limitations. The ESPP provides for twelve-month offering periods, and each offering period will include purchase periods, which will be the approximately six-month period commencing with one exercise date and ending with the next exercise date. Employees are able to purchase shares at 85% of the lower of the fair market value of the Company’s common stock on the first trading day of the offering period or on the exercise date. The number of shares available for sale under the ESPP were and will be increased annually on the first day of each fiscal year, equal to the least of i) 11.3 million shares; ii) 1% of the outstanding shares of the Company’s common stock as of the last day of the immediately preceding fiscal year; or iii) such other amount as determined by the Board of Directors. During the years ended December 31, 2019 and 2018, employees purchased an aggregate of 1.6 million and 1.5 million shares, respectively, under this plan at a weighted average price of $26.62 and $19.03 per share, respectively. Stock Option Activity A summary of stock option activity for the year ended December 31, 2019 is as follows (in thousands, except years and per share data): Options Outstanding Number of Weighted- Weighted- Aggregate Outstanding at December 31, 2018 3,692 $ 8.88 3.64 $ 73,581 Options granted and assumed in connection with acquisitions — $ — Options exercised (361) $ 2.32 Options canceled (104) $ 1.75 Outstanding at December 31, 2019 3,227 $ 9.84 2.65 $ 74,630 Exercisable at December 31, 2019 3,211 $ 9.98 2.63 $ 74,250 The aggregate intrinsic value in the table above represents the difference between the fair value of common stock and the exercise price of outstanding, in-the-money stock options. The total intrinsic values of stock options exercised in the years ended December 31, 2019, 2018 and 2017 were $13.1 million, $16.9 million and $51.6 million, respectively. Performance Restricted Stock Units Activity The Company grants restricted stock units to certain of its executive officers periodically that vest based on the Company’s attainment of the annual financial performance goals and the executives’ continued employment through the vesting date, approximately one year (PRSUs). These PRSUs are granted when the annual performance targets are set and the awards are approved by the Compensation Committee of the Board of Directors, generally in the first quarter of each financial year. The following table summarizes the activity related to the Company’s PRSUs for the year ended December 31, 2019 (in thousands, except per share data): PRSUs Outstanding Shares Weighted- Unvested and outstanding at December 31, 2018 390 $ 35.55 Granted (100% target level) 646 $ 31.52 Additional earned performance shares related to 2018 grants 362 $ 35.55 Vested (193% target level) (752) $ 35.55 Unvested and outstanding at December 31, 2019 646 $ 31.52 The PRSUs unvested and outstanding at December 31, 2019 include 646,000 shares of performance based awards for the 2019 performance period, which are expected to vest at 100% of target or approximately 646,000 PRSUs, based on the financial results of the 2019 financial year. The total fair value of PRSUs vested during the year ended December 31, 2019 was $23.2 million. The Company also grants restricted stock units to certain of its executive officers that vest based on Twitter stock price performance relative to a broad-market index over a performance period of two The following table summarizes the activity related to the Company’s TSR RSUs for the year ended December 31, 2019 (in thousands, except per share data): TSR RSUs Outstanding Shares Weighted- Unvested and outstanding at December 31, 2018 420 $ 45.78 Granted (100% target level) 431 $ 30.60 Additional earned performance shares related to 2018 grants 30 $ 13.02 Vested (132% target level) (122) $ 13.02 Unvested and outstanding at December 31, 2019 759 $ 41.15 The TSR RSUs unvested and outstanding at December 31, 2019 include 328,000 shares of performance based awards for the 2018 to 2019 performance period, which are expected to vest at 116% of target, or approximately 381,000 TSR RSUs, based on the financial results of the 2018 and 2019 financial years. The total fair value of TSR RSUs vested during the year ended December 31, 2019 was $3.7 million. In addition, there are 443,311 additional PRSUs and TSR RSUs at the 100% target level that will vest based on performance goals and Total Shareholder Return (TSR) targets to be granted in 2020 at target levels from 0% to 200%. RSU Activity The following table summarizes the activity related to the Company’s RSUs, excluding PRSUs and TSR RSUs, for the year ended December 31, 2019. For purposes of this table, vested RSUs represent the shares for which the service condition had been fulfilled as of each respective date (in thousands, except per share data): RSUs Outstanding Shares Weighted- Unvested and outstanding at December 31, 2018 30,387 $ 24.97 Granted 17,291 $ 33.73 Vested (12,646) $ 24.74 Canceled (3,301) $ 25.89 Unvested and outstanding at December 31, 2019 31,731 $ 29.74 The total fair value of RSUs vested during the year ended December 31, 2019, 2018, and 2017 was $454.5 million, $445.7 million, and $358.7 million, respectively. Stock-Based Compensation Expense Stock-based compensation expense is allocated based on the cost center to which the award holder belongs. Total stock-based compensation expense by function is as follows (in thousands): Year Ended December 31, 2019 2018 2017 Cost of revenue $ 22,797 $ 17,289 $ 23,849 Research and development 209,063 183,799 240,833 Sales and marketing 85,739 71,305 94,135 General and administrative 60,426 53,835 74,989 Total stock-based compensation expense $ 378,025 $ 326,228 $ 433,806 The amount of incremental stock-based compensation recorded in relation to the modification of stock-based awards was not material for the years ended December 31, 2019, 2018 and 2017. The Company capitalized $37.5 million, $41.4 million and $51.8 million of stock-based compensation expense associated with the cost for developing software for internal use in the years ended December 31, 2019, 2018 and 2017, respectively. As of December 31, 2019, there was $874.7 million of gross unamortized stock-based compensation expense related to unvested awards which is expected to be recognized over a weighted-average period of 2.7 years. The Company accounts for forfeitures as they occur.

Income Taxes

Income Taxes 12 Months Ended
Dec. 31, 2019
Income Tax Disclosure [Abstract]
Income Taxes Income Taxes The domestic and foreign components of income (loss) before income taxes for the years ended December 31, 2019, 2018 and 2017 are as follows (in thousands): Year Ended December 31, 2019 2018 2017 Domestic $ 317,135 $ 193,500 $ (18,412) Foreign 73,004 230,044 (77,006) Income (loss) before income taxes $ 390,139 $ 423,544 $ (95,418) The components of the provision (benefit) for income taxes for the years ended December 31, 2019, 2018 and 2017 are as follows (in thousands): Year Ended December 31, 2019 2018 2017 Current: Federal $ 563 $ (1,661) $ 1,977 State 3,375 4,083 316 Foreign 43,053 17,246 16,767 Total current provision for income taxes 46,991 19,668 19,060 Deferred: Federal 2,023 (711,084) (4,701) State 2,050 (49,047) (67) Foreign (1,126,584) (41,589) (1,647) Total deferred benefit for income taxes (1,122,511) (801,720) (6,415) Provision (benefit) for income taxes $ (1,075,520) $ (782,052) $ 12,645 The following is a reconciliation of the statutory federal income tax rate to the Company’s effective tax rate for the years ended December 31, 2019, 2018 and 2017: Year Ended December 31, 2019 2018 2017 Tax at federal statutory rate 21.0 % 21.0 % 35.0 % State taxes, net of federal benefit 1.1 (8.4) (0.3) Stock-based compensation (4.9) (6.4) (28.5) Research and development credits (8.5) (5.6) 18.6 Valuation allowance (0.2) (179.1) 425.2 Effect of the U.S. Tax Act 0.0 0.0 (369.8) Nondeductible other expenses 3.1 0.2 (8.7) Deferred tax asset on intra-entity transfer of intangible assets (308.4) 0.0 0.0 Foreign rate differential 20.3 (6.4) (81.2) Other 0.8 0.1 (3.6) Effective tax rate (275.7) % (184.6) % (13.3) % The tax effects of temporary differences and related deferred tax assets and liabilities as of December 31, 2019 and 2018 are as follows (in thousands): December 31, 2019 2018 Deferred tax assets: Net operating loss carryforwards $ 390,005 $ 513,427 Accruals and reserves 37,172 32,298 Stock-based compensation expense 32,573 29,600 Tax credits 425,011 375,699 Capitalized research expenditures 1,679 13,868 Fixed assets and intangible assets 1,214,070 24,819 Investments 15,560 16,571 Operating lease liability 170,817 — Other 3,131 17,658 Total deferred tax assets 2,290,018 1,023,940 Valuation allowance (223,775) (210,862) Total deferred tax assets, net of valuation allowance 2,066,243 813,078 Deferred tax liabilities: Operating lease right-of-use asset (157,845) — Other (1,138) (4,619) Total deferred tax liabilities (158,983) (4,619) Net deferred tax assets $ 1,907,260 $ 808,459 During the year ended December 31, 2019, the Company transferred certain intangible assets among its wholly-owned subsidiaries to align its structure to its evolving operations, which resulted in the establishment of deferred tax assets and the recognition of a deferred tax benefit from income tax of $1.21 billion. During the year ended December 31, 2018, the Company released the valuation allowance related to most of the United States federal and all states deferred tax assets with the exception of California and Massachusetts, as well as Brazil, which resulted in an income tax benefit of $845.1 million. The Company continues to maintain a valuation allowance related to specific net deferred tax assets where it is not more likely than not that the deferred tax assets will be realized, which include all capital losses and California and Massachusetts net deferred tax assets. The Company concluded, based upon the preponderance of positive evidence (i.e. cumulative profit before tax adjusted for permanent items over the previous twelve quarters, a history of taxable income in recent periods, and the current forecast of income before taxes for the United States going forward) over negative evidence and the anticipated ability to use the deferred tax assets, that it was more likely than not that the deferred tax assets could be realized. If there are unfavorable changes to actual operating results or to projections of future income, the Company may determine that it is more likely than not such deferred tax assets may not be realizable. On June 7, 2019, the Ninth Circuit Court of Appeals issued a new opinion in the case of Altera Corp. v. Commissioner, which upheld Department of Treasury regulations which require related parties in an intercompany cost-sharing arrangement to share expenses related to stock-based compensation. During the year ended December 31, 2019, the Company evaluated the Court’s ruling and have recorded an increase in the tax provision of $80.0 million. In February 2020, Altera Corp. filed a petition to appeal the decision with the Supreme Court of the United States. The Company will continue to monitor future developments in this case to determine if there will be further impacts to the consolidated financial statements. The Company has recorded a valuation allowance of $13.9 million and $14.6 million against its gross U.S. federal deferred tax asset balance as of December 31, 2019, and December 31, 2018, respectively, as well as a valuation allowance of $209.9 million and $196.3 million against its gross state deferred tax asset balance as of December 31, 2019, and December 31, 2018, respectively. At December 31, 2019, the Company had $2.34 billion of U.S. federal and $1.26 billion of state net operating losses, which will begin to expire in 2034 for federal and 2024 for state tax purposes, if not utilized. The Company also has $345.2 million and $264.8 million of U.S. federal and state research credit carryforwards, respectively. The U.S. federal credit carryforward will begin to expire in 2027, if not utilized. The majority of state research tax credits have no expiration date. A small portion of state research tax credits will begin to expire in 2030, if not utilized. Additionally, the Company has California Enterprise Zone Credit carryforwards of $19.1 million which will begin to expire in 2023, if not utilized. Utilization of the net operating loss and credit carryforwards may be subject to an annual limitation due to the ownership change limitations provided by the Internal Revenue Code of 1986, as amended (the “Code”), and similar state provisions. Any annual limitation may result in the expiration of net operating losses and credits before utilization. As of December 31, 2019, the Company has $419.9 million of unrecognized tax benefits, of which $348.2 million could result in a reduction of the Company's effective tax rate, if recognized. The remainder of the unrecognized tax benefits would not affect the annual effective tax rate due to the full valuation allowance recorded for California and Massachusetts deferred tax assets. A reconciliation of the beginning and ending amount of unrecognized tax benefit is as follows (in thousands): Year Ended December 31, 2019 2018 2017 Gross unrecognized tax benefits at the beginning of the year $ 332,314 $ 259,781 $ 269,508 Increases related to prior year tax positions 54,743 20,000 913 Decreases related to prior year tax positions (2,537) (13,174) — Decreases related to settlement with tax authorities — — (1,415) Decreases related to the Tax Act — — (71,104) Increases related to current year tax positions 35,338 66,249 61,879 Statute of limitations expirations — (542) — Gross unrecognized tax benefits at the end of the year $ 419,858 $ 332,314 $ 259,781 Total unrecognized tax benefits are recorded on the Company’s consolidated balance sheets as follows (in thousands): December 31, 2019 2018 Total unrecognized tax benefits balance $ 419,858 $ 332,314 Amounts netted against related deferred tax assets (401,818) (317,524) Unrecognized tax benefits recorded on consolidated balance sheets $ 18,040 $ 14,790 The Company recognizes interest and/or penalties related to income tax matters as a component of income tax expense. During the years ended December 31, 2019, 2018 and 2017, the Company recognized immaterial amounts of interest and penalties in income tax expense. As of December 31, 2019 and 2018, the Company recorded $5.3 million and $3.1 million of interest and penalties related to uncertain tax positions, respectively. The Company is subject to taxation in the United States and various state and foreign jurisdictions. Earnings from non-US activities are subject to local country income tax. The material jurisdictions in which the Company is subject to potential examination by taxing authorities include the United States, California and Ireland. The Company believes that adequate amounts have been reserved in these jurisdictions. The Company’s 2007 to 2018 tax attributes remain subject to examination by the United States and California, and its 2015 to 2018 tax years remain subject to examination in Ireland. The Company remains subject to possible examination in various other jurisdictions that are not expected to result in material tax adjustments. The Company does not believe that its unrecognized tax benefits will materially change within the next 12 months.

Commitments and Contingencies

Commitments and Contingencies 12 Months Ended
Dec. 31, 2019
Commitments and Contingencies Disclosure [Abstract]
Commitments and Contingencies Commitments and Contingencies Credit Facility The Company has a revolving credit agreement with certain lenders, which provides for a $500.0 million unsecured revolving credit facility maturing on August 7, 2023. The Company is obligated to pay interest on loans under the new credit facility and other customary fees for a credit facility of this size and type, including an upfront fee and an unused commitment fee. The interest rate for the credit facility is determined based on calculations using certain market rates as set forth in the credit agreement. In addition, the credit facility contains restrictions on payments including cash payments of dividends. As of December 31, 2019, no amounts had been drawn under the credit facility. Contractual Obligations The Company's principal commitments consist of obligations under the Notes (including principal and coupon interest), operating and finance leases for equipment, office space and co-located data center facilities, as well as non-cancellable contractual commitments. The following table summarizes its commitments to settle contractual obligations in cash as of December 31, 2019: Payments Due by Year Total 2020 2021-2022 2023-2024 Thereafter (In thousands) 2021 Notes $ 973,106 $ 9,566 $ 963,540 $ — $ — 2024 Notes 1,162,914 2,875 5,734 1,154,305 — 2027 Notes 917,446 27,626 54,213 54,287 781,320 Operating lease obligations (1) 1,149,558 180,183 321,700 226,662 421,013 Finance lease obligations 24,414 23,845 569 — — Other contractual commitments (2) 458,400 125,523 224,089 99,597 9,191 Total contractual obligations $ 4,685,838 $ 369,618 $ 1,569,845 $ 1,534,851 $ 1,211,524 (1) The Company has entered into several sublease agreements for office space that it is not fully utilizing. Under the sublease agreements, the Company will receive approximately $21.8 million in sublease income over the next three years. (2) Other contractual commitments are non-cancelable contractual commitments primarily related to the Company’s infrastructure services, bandwidth and other services arrangements. Legal Proceedings Beginning in September 2016, multiple putative class actions and derivative actions were filed in state and federal courts in the United States against the Company and the Company’s directors and/or certain former officers alleging that false and misleading statements, made in 2015, are in violation of securities laws and breached fiduciary duty. The putative class actions were consolidated in the U.S. District Court for the Northern District of California. On October 16, 2017, the court granted in part and denied in part the Company’s motion to dismiss. On July 17, 2018, the court granted plaintiffs' motion for class certification in the consolidated securities action. The Company filed a motion for summary judgment on September 13, 2019, and oral argument on the motion is scheduled for April 1, 2020. The Company disputes the claims and intends to continue to defend the lawsuits vigorously. On October 29, 2019, a putative class action (captioned Hasan v. Twitter, Inc., et al.) was filed in the U.S. District Court for the Northern District of California against the Company and certain of the Company’s officers alleging violations of securities laws in connection with the Company’s announcements that it had discovered and taken steps to remediate issues related to certain user settings designed to target advertising that were not working as expected and seeking unspecified damages. The Company disputes the claims and intends to defend the lawsuit vigorously. From time to time the Company notifies the Irish Data Protection Commission, its designated European privacy regulator under the European Union General Data Protection Regulation, or GDPR, and other regulators, of certain personal data breaches and privacy issues, and is subject to inquiries and investigations regarding various aspects of our regulatory compliance. The Company is currently the subject of inquiries by the Irish Data Protection Commission with respect to its compliance with the GDPR. The Company is also currently involved in, and may in the future be involved in, legal proceedings, claims, investigations, and government inquiries and investigations arising in the ordinary course of business. These proceedings, which include both individual and class action litigation and administrative proceedings, have included, but are not limited to matters involving content on the platform, intellectual property, privacy, data protection, securities, employment and contractual rights. Legal fees and other costs associated with such actions are expensed as incurred. The Company assesses, in conjunction with its legal counsel, the need to record a liability for litigation and contingencies. Litigation accruals are recorded when and if it is determined that a loss related matter is both probable and reasonably estimable. Material loss contingencies that are reasonably possible of occurrence, if any, are subject to disclosure. As of December 31, 2019, except for the above referenced class actions and derivative actions, there was no litigation or contingency with at least a reasonable possibility of a material loss. No material losses have been recorded during the years ended December 31, 2019, 2018 and 2017 with respect to litigation or loss contingencies. Non-Income Taxes The Company is under various non-income tax audits by domestic and foreign tax authorities. These audits primarily revolve around routine inquiries, refund requests, and employee benefits. The Company accrues non-income taxes that may result from these audits when they are probable and can be reasonably estimated. Due to the complexity and uncertainty of some of these matters, however, as well as the judicial process in certain jurisdictions, the final outcome of these audits may be materially different from the Company's expectations. Indemnification In the ordinary course of business, the Company often includes standard indemnification provisions in its arrangements with its customers, partners, suppliers and vendors. Pursuant to these provisions, the Company may be obligated to indemnify such parties for losses or claims suffered or incurred in connection with its service, breach of representations or covenants, intellectual property infringement or other claims made against such parties. These provisions may limit the time within which an indemnification claim can be made. It is not possible to determine the maximum potential amount under these indemnification obligations due to the limited history of prior indemnification claims and the unique facts and circumstances involved in each particular agreement. The Company has never incurred significant expense defending its licensees against third-party claims, nor has it ever incurred significant expense under its standard service warranties or arrangements with its customers, partners, suppliers and vendors. Accordingly, the Company had no liabilities recorded for these provisions as of December 31, 2019 and 2018.

Related Party Transactions

Related Party Transactions 12 Months Ended
Dec. 31, 2019
Related Party Transactions [Abstract]
Related Party Transactions Related Party TransactionsCertain of the Company’s directors have affiliations with customers of the Company. The Company recognized revenue under contractual obligations from such customers of $22.0 million, $25.9 million and $22.5 million for the years ended December 31, 2019, 2018 and 2017, respectively. The Company had outstanding receivable balances of $4.2 million and $3.8 million from such customers as of December 31, 2019 and 2018, respectively.

Employee Benefit Plan

Employee Benefit Plan 12 Months Ended
Dec. 31, 2019
Retirement Benefits [Abstract]
Employee Benefit Plan Employee Benefit PlanThe Company has a 401(k) Plan that qualifies as a deferred compensation arrangement under Section 401 of the Internal Revenue Code. Under the 401(k) Plan, participating employees may defer a portion of their pretax earnings not to exceed the maximum amount allowable. Matching contributions are based upon the amount of the employees’ contributions subject to certain limitations. The matching contributions made by the Company were $8.8 million, $6.3 million, and $2.8 million for the years ended December 31, 2019, 2018 and 2017, respectively.

Segment Information and Operati

Segment Information and Operations by Geographic Area 12 Months Ended
Dec. 31, 2019
Segment Reporting [Abstract]
Segment Information and Operations by Geographic Area Segment Information and Operations by Geographic Area The Company has a single operating segment and reporting unit structure. The Company’s chief operating decision-maker is the Chief Executive Officer who reviews financial information presented on a consolidated basis for purposes of allocating resources and evaluating financial performance. Revenue See Note 3 – Revenue for further details. Property and Equipment, net The following table sets forth property and equipment, net by geographic area (in thousands): December 31, December 31, Property and equipment, net: United States $ 999,552 $ 853,731 International 32,229 31,347 Total property and equipment, net $ 1,031,781 $ 885,078

Schedule II - Valuation and Qua

Schedule II - Valuation and Qualifying Accounts 12 Months Ended
Dec. 31, 2019
SEC Schedule, 12-09, Valuation and Qualifying Accounts [Abstract]
Valuation and Qualifying Accounts SCHEDULE II VALUATION AND QUALIFYING ACCOUNTS FOR THE YEARS ENDED DECEMBER 31, 2019, 2018 AND 2017 Balance at Charged to Charged/ Balance at (In thousands) Allowance for Deferred Tax Assets: Year ended December 31, 2019 $ 210,862 $ 12,913 $ — $ 223,775 Year ended December 31, 2018 $ 1,021,326 $ (817,529) $ 7,065 $ 210,862 Year ended December 31, 2017 $ 439,993 $ (346,389) $ 927,722 $ 1,021,326 Balance at Additions Write-off/ Balance at (In thousands) Allowance for Doubtful Accounts: Year ended December 31, 2019 $ 3,559 $ 3,083 $ (4,241) $ 2,401 Year ended December 31, 2018 $ 5,430 $ 1,610 $ (3,481) $ 3,559 Year ended December 31, 2017 $ 7,216 $ 586 $ (2,372) $ 5,430

Summary of Significant Accoun_2

Summary of Significant Accounting Policies (Policies) 12 Months Ended
Dec. 31, 2019
Accounting Policies [Abstract]
Principles of Consolidation Principles of Consolidation The consolidated financial statements include the accounts of the Company and its wholly-owned subsidiaries. All intercompany accounts and transactions have been eliminated in consolidation.
Prior Period Reclassifications Prior Period Reclassifications Certain prior period amounts have been reclassified to conform to the current period presentation.
Use of Estimates Use of Estimates The preparation of the Company’s consolidated financial statements in conformity with generally accepted accounting principles in the United States of America (“GAAP”) requires management to make estimates and assumptions that affect the reported amounts of assets, liabilities, revenue and expenses, as well as related disclosure of contingent assets and liabilities. Actual results could differ materially from the Company’s estimates. To the extent that there are material differences between these estimates and actual results, the Company’s financial condition or operating results will be affected. The Company bases its estimates on past experience and other assumptions that management believes are reasonable based on its knowledge of current events, as well as its expectations about actions it may take in the future, and evaluates these estimates on an ongoing basis.
Revenue Recognition Revenue Recognition The Company generates the substantial majority of its revenue from the sale of advertising services with the remaining balance from data licensing and other arrangements. The Company generates its advertising revenue primarily from the sale of its Promoted Products: (i) Promoted Tweets, (ii) Promoted Accounts and (iii) Promoted Trends. Promoted Tweets and Promoted Accounts are pay-for-performance advertising products or pay on impressions delivered, each priced through an auction. Promoted Trends are featured by geography and offered on a fixed-fee-per-day basis. Advertisers are obligated to pay when a person engages with a Promoted Tweet, follows a Promoted Account, when an impression is delivered, or when a Promoted Trend is displayed for an entire day in a particular country or on a global basis. These advertising services may be sold in combination as a bundled arrangement or separately on a stand-alone basis. For the Company's Promoted Product arrangements, significant judgments are (i) identifying the performance obligations in the contract, (ii) determining the basis for allocating contract consideration to performance obligations, (iii) determining whether the Company is the principal or the agent in arrangements where another party is involved in providing specified services to a customer, and (iv) estimating the transaction price to be allocated for contracts with tiered rebate provisions. The Company may generate revenue from the sale of certain Promoted Tweets through placement by Twitter of advertiser ads against third-party publisher content. The Company will pay the third-party publisher a revenue share fee for its right to monetize their content. In such transactions, advertisers are contracting to obtain a single integrated advertising service, the Promoted Tweet combined with the third-party publisher content, and the Company obtains control of the third-party publisher content displayed on Twitter that it then combines with the advertiser ads within the Promoted Tweet. Therefore, the Company reports advertising revenue generated from these transactions on a gross basis and records the related third-party content monetization fees as cost of revenue. The Company also generates advertising revenue by selling services in which the Company places ads on third-party publishers’ websites, applications or other offerings. To fulfill these transactions, the Company purchases advertising inventory from third-party publishers’ websites and applications where the Company has identified the advertisers’ targeted audience and therefore incurs traffic acquisition costs prior to transferring the advertising service to its customers. At such point, the Company has the sole ability to monetize the third-party publishers advertising inventory. In such transactions, the Company obtains control of a right to a service to be performed by the third-party publishers, which gives the Company the ability to direct those publishers to provide the services to the Company's customers on the Company's behalf. Therefore, the Company reports advertising revenue generated from these transactions on a gross basis and records the related traffic acquisition costs as cost of revenue. Fees for the advertising services above are recognized in the period when advertising is delivered as evidenced by a person engaging with a Promoted Tweet or an ad on a third-party publisher website or application in a manner satisfying the types of engagement selected by the advertisers, such as Tweet engagements (e.g., Retweets, replies and likes), website clicks, mobile application installs or engagements, obtaining new followers, or video views, following a Promoted Account, delivery of impressions, or through the display of a Promoted Trend on the Company's platform. The Company has concluded that its data licensing arrangements, which grant customers a right to Twitter’s intellectual property (“IP”) for a defined period of time, may contain a single performance obligation satisfied at a point in time (“Historical IP”) or over time (“Future IP”), or may contain two or more performance obligations satisfied separately at a point in time (Historical IP) and over time (Future IP). In some of the Company's data licensing arrangements, pricing is a fixed monthly fee over a specified term. In arrangements with a single performance obligation satisfied over time, data licensing revenue is recognized on a straight-line basis over the period in which the Company provides data as the customer consumes and benefits from the continuous data available on an ongoing basis. In arrangements with at least two performance obligations, the Company allocates revenue on a relative basis between the performance obligations based on standalone selling price (“SSP”) and recognizes revenue as the performance obligations are satisfied. In other data licensing arrangements, the Company charges customers based on the amount of sales they generate from downstream customers using Twitter data. Certain of those royalty-based data licensing arrangements are subject to minimum guarantees. For such arrangements with a minimum guarantee and a single Future IP performance obligation, the Company recognizes revenue for minimum guarantees on a straight-line basis over the period in which the Company provides data. For such arrangements with a minimum guarantee and two or more performance obligations, the Company allocates revenue on a relative basis between the performance obligations based on SSP and recognizes revenue as the performance obligations are satisfied. Royalties in excess of minimum guarantees, if any, are recognized as revenue over the contract term, on a straight-line, cumulative catch-up basis. This reflects the nature of the Company’s performance obligation, which is a series of distinct monthly periods of providing a license of IP. For data licensing arrangements involving two or more performance obligations, the Company uses directly observable standalone transactions to determine SSP of Historical IP. The Company uses standalone transactions and considers all other reasonably available observable evidence to estimate SSP of Future IP. Other revenue is primarily generated from service fees from transactions completed on the Company's mobile ad exchange. The Company's mobile ad exchange enables buyers and sellers to purchase and sell advertising inventory by matching them in the exchange. The Company has determined it is not the principal in the purchase and sale of advertising inventory in transactions between third-party buyers and sellers on the exchange because the Company does not obtain control of the advertising inventory. The Company reports revenue related to its ad exchange services on a net basis for the fees paid by buyers, net of costs related to acquiring the advertising inventory paid to sellers. Arrangements involving multiple performance obligations primarily consist of combinations of the Company's pay-for-performance products, Promoted Tweets and Promoted Accounts, which are priced through an auction, and Promoted Trends, which are priced on a fixed-fee-per day, per geography basis. For arrangements that include a combination of these products, the Company develops an estimate of the standalone selling price for these products in order to allocate any potential discount to all performance obligations in the arrangement. The estimate of standalone selling price for pay-for-performance auction based products is determined based on the winning bid price. The estimate of standalone selling price for Promoted Trends is based on Promoted Trends sold on a standalone basis and/or separately priced in a bundled arrangement by reference to a list price by geography, which is updated and approved periodically. For other arrangements involving multiple performance obligations where neither auction pricing nor standalone sales provide sufficient evidence of standalone selling price, the Company estimates standalone selling price using either an adjusted market assessment approach or an expected cost plus margin approach. The Company believes the use of its estimation approach and allocation of the transaction price on a relative standalone selling price basis to each performance obligation results in revenue recognition in a manner consistent with the underlying economics of the transaction and the allocation principle included in Topic 606. The Company has elected to exclude certain sales and indirect taxes from the determination of the transaction price.
Cost of Revenue Cost of Revenue Cost of revenue includes infrastructure costs, other direct costs including revenue share expenses, amortization expense of technology acquired through acquisitions and amortization of capitalized labor costs for internally developed software, allocated facilities costs, as well as traffic acquisition costs (“TAC”). Infrastructure costs consist primarily of data center costs related to the Company’s co-located facilities, which include lease and hosting costs, related support and maintenance costs and energy and bandwidth costs, public cloud hosting costs, as well as depreciation of servers and networking equipment, and personnel-related costs, including salaries, benefits and stock-based compensation, for its operations teams. Revenue share expenses are primarily related to payments to providers from whom the Company licenses content, in order to increase engagement on the platform. The fees paid to these content providers may be based on revenues generated, or a minimum guaranteed fee. TAC consists of costs incurred with third parties in connection with the sale to advertisers of advertising products that the Company places on third-party publishers’ websites, applications or other offerings collectively resulting from acquisitions and from the Company’s organically-built advertising network, Twitter Audience Platform.
Stock-Based Compensation Expense Stock-Based Compensation Expense The Company accounts for stock-based compensation expense under the fair value recognition and measurement provisions of GAAP. Stock-based awards granted to employees are measured based on the grant-date fair value. For service-based restricted stock awards and performance-based restricted stock awards without market conditions, the Company recognizes the compensation expense only for those awards expected to meet the performance and service vesting condition on a straight-line basis over the requisite service period which is generally one year for performance vesting condition awards and up to five years for service vesting condition awards. For performance-based restricted stock awards with market conditions, the Company recognizes the compensation expense on a straight-line basis over the requisite service period regardless of whether the market condition is satisfied, provided that the requisite service has been provided, which is generally two years. The Company accounts for forfeitures as they occur. The Company estimates the fair value of stock options granted and stock purchase rights provided under the Company’s employee stock purchase plan using the Black-Scholes option pricing model on the dates of grant. The compensation expense related to stock options and employee stock purchase rights is recognized on a straight-line basis over the requisite service period. The fair value of performance-based restricted stock awards with market conditions is determined using a Monte Carlo simulation to estimate the grant date fair value. The Company issues restricted stock subject to a lapsing right of repurchase to continuing employees of certain acquired companies. Since these issuances are subject to post-acquisition employment, the Company accounts for them as post-acquisition stock-based compensation expense. The grant-date fair value of restricted stock granted in connection with acquisitions is recognized as stock-based compensation expense on a straight-line basis over the requisite service period.
Acquisitions The Company accounts for acquisitions of entities that include inputs and processes and have the ability to create outputs as business combinations. The purchase price of the acquisition is allocated to the tangible and intangible assets acquired and liabilities assumed based on their estimated fair values at the acquisition dates. The excess of the purchase price over those fair values is recorded as goodwill. During the measurement period, which may be up to one year from the acquisition date, the Company may record adjustments to the assets acquired and liabilities assumed with the corresponding offset to goodwill. Upon the conclusion of the measurement period or final determination of the values of assets acquired or liabilities assumed, whichever comes first, any subsequent adjustments are recorded to the consolidated statements of operations.
Investments in Privately-Held Companies Investments in Privately-Held Companies The Company makes strategic investments in privately-held companies. The Company also evaluates each investee to determine if the investee is a variable interest entity and, if so, whether the Company is the primary beneficiary of the variable interest entity. The Company’s investments in privately-held companies are primarily non-marketable equity securities without readily determinable fair values. The Company accounts for its investments in privately-held companies either under equity method accounting or by adjusting the carrying value of its non-marketable equity securities to fair value upon observable transactions for identical or similar investments of the same issuer or upon impairment (referred to as the measurement alternative). All gains and losses on non-marketable equity securities, realized and unrealized, are recognized in other income (expense), net in the consolidated statements of operations. The Company periodically evaluates the carrying value of the investments in privately-held companies, when events and circumstances indicate that the carrying amount of the investment may not be recovered. The Company estimates the fair value of the investments to assess whether impairment losses shall be recorded using Level 3 inputs. These investments include the Company’s holdings in privately-held companies that are not exchange traded and therefore not supported with observable market prices; hence, the Company may determine the fair value by reviewing equity valuation reports, current financial results, long-term plans of the private companies, the amount of cash that the privately-held companies have on-hand, the ability to obtain additional financing and overall market conditions in which the private companies operate or based on the price observed from the most recent completed financing.
Loss Contingencies Loss Contingencies The Company is currently involved in, and may in the future be involved in, legal proceedings, claims, investigations, and government inquiries and investigations arising in the ordinary course of business. The Company records a liability when it believes that it is both probable that a loss has been incurred and the amount or range can be reasonably estimated. Significant judgment is required to determine both probability and the estimated amount. The Company reviews these provisions on a quarterly basis and adjust these provisions accordingly to reflect the impact of negotiations, settlements, rulings, advice of legal counsel, and updated information.
Operating and Finance Leases Operating and Finance Leases The Company has operating leases primarily for office space and data center facilities. The determination of whether an arrangement is a lease or contains a lease is made at inception by evaluating whether the arrangement conveys the right to use an identified asset and whether the Company obtains substantially all of the economic benefits from and has the ability to direct the use of the asset. Operating leases are included in operating lease right-of-use assets, operating lease liabilities, short-term, and operating lease liabilities, long-term on the Company’s consolidated balance sheets. With the exception of initial adoption of the new lease standard, where the Company’s incremental borrowing rate used was the rate on the adoption date (January 1, 2019), operating lease ROU assets and operating lease liabilities are recognized based on the present value of lease payments over the lease term at the lease commencement date. To determine the incremental borrowing rate used to calculate the present value of future lease payments, the Company uses information including the Company’s credit rating, interest rates of similar debt instruments of entities with comparable credit ratings, and Twitter, Inc.’s guarantee of certain leases in foreign jurisdictions, as applicable. Certain lease agreements contain options for the Company to renew a lease for a term of up to ten years or an option to terminate a lease early within one year. The Company considers these options, which may be elected at the Company’s sole discretion, in determining the lease term on a lease-by-lease basis. Leases with an initial term of twelve months or less are not recognized on the consolidated balance sheets. The Company recognizes lease expense for these leases on a straight-line basis over the term of the lease. The Company also has server and networking equipment lease arrangements with original lease terms ranging from three four The Company’s lease agreements generally do not contain any material residual value guarantees or material restrictive covenants. Certain of the Company’s leases contain free or escalating rent payment terms. Additionally, certain lease agreements contain lease components (for example, fixed payments such as rent) and non-lease components such as common-area maintenance costs. For each asset class of the Company’s leases—real estate offices, data centers, and equipment—the Company has elected to account for both of these provisions as a single lease component. For arrangements accounted for as a single lease component, there may be variability in future lease payments as the amount of the non-lease components is typically revised from one period to the next. These variable lease payments, which are primarily comprised of common-area maintenance, utilities, and real estate taxes that are passed on from the lessor in proportion to the space leased by the Company, are recognized in operating expenses in the period in which the obligation for those payments was incurred. The Company recognizes lease expense for its operating leases in operating expenses on a straight-line basis over the term of the lease. The Company subleases certain leased office space to third parties when it determines there is excess leased capacity. Certain of these subleases contain both lease and non-lease components. The Company has elected to account for both of these provisions as a single lease component. Sublease rent income is recognized as an offset to operating expense on a straight-line basis over the lease term. In addition to sublease rent, variable non-lease costs such as common-area maintenance, utilities, and real estate taxes are charged to subtenants over the duration of the lease for their proportionate share of these costs. These variable non-lease income receipts are recognized in operating expenses as a reduction to costs incurred by the Company in relation to the head lease.
Cash, Cash Equivalents and Investments Cash, Cash Equivalents and Investments The Company invests its excess cash primarily in short-term fixed income securities, including government and investment-grade debt securities and money market funds. The Company classifies all liquid investments with stated maturities of three months or less from date of purchase as cash equivalents. The Company classifies all marketable securities for use in current operations, even if the security matures beyond 12 months, and presents them as short-term investments in the consolidated balance sheets. As of December 31, 2019 and 2018, the Company has restricted cash balances of $1.9 million and $1.7 million, respectively, within prepaid expenses and other current assets and $26.7 million and $25.7 million, respectively, in other assets on the accompanying consolidated balance sheets based upon the term of the remaining restrictions. These restricted cash balances are primarily cash deposits to back letters of credit related to certain property leases. The Company determines the appropriate classification of its investments in marketable securities at the time of purchase and reevaluates such designation at each balance sheet date. The Company has classified and accounted for its marketable securities as available-for-sale. After considering the Company’s capital preservation objectives, as well as its liquidity requirements, the Company may sell securities prior to their stated maturities. The Company carries its available-for-sale securities at fair value, and reports the unrealized gains and losses, net of taxes, as a component of stockholders’ equity, except for unrealized losses determined to be other-than-temporary which are recorded as other income (expense), net. The Company determines any realized gains or losses on the sale of marketable securities on a specific identification method and records such gains and losses as a component of other income (expense), net. Interest earned on cash, cash equivalents, and marketable securities was $157.7 million, $111.2 million, and $44.4 million during the years ended December 31, 2019, 2018 and 2017, respectively. These balances are recorded in interest income in the accompanying consolidated statements of operations. The Company evaluates the investments periodically for possible other-than-temporary impairment. A decline in fair value below the amortized costs of debt securities is considered an other-than-temporary impairment if the Company has the intent to sell the security or it is more likely than not that the Company will be required to sell the security before recovery of the entire amortized cost basis. In those instances, an impairment charge equal to the difference between the fair value and the amortized cost basis is recognized in earnings. Regardless of the Company’s intent or requirement to sell a debt security, impairment is considered other-than-temporary if the Company does not expect to recover the entire amortized cost basis.
Concentration of Credit Risk Concentration of Credit Risk Financial instruments that potentially subject the Company to significant concentration of credit risk consist primarily of cash, cash equivalents, short-term investments and accounts receivable. The primary focus of the Company’s investment strategy is to preserve capital and meet liquidity requirements. The Company’s investment policy addresses the level of credit exposure by limiting the concentration in any one corporate issuer or sector and establishing a minimum allowable credit rating. To manage the risk exposure, the Company invests cash equivalents and short-term investments in a variety of fixed income securities, including government and investment-grade debt securities and money market funds. The Company places its cash primarily in checking and money market accounts with reputable financial institutions. Deposits held with these financial institutions may exceed the amount of insurance provided on such deposits, if any. The Company’s accounts receivable are typically unsecured and are derived from customers around the world in different industries. The Company includes terms in its contracts providing the ability to stop transferring promised goods or services, performs ongoing credit evaluations of its customers, and maintains allowances for potential credit losses. Historically, such losses have been within management’s expectations. As of December 31, 2019 and 2018, no single customer accounted for more than 10% of the Company’s net accounts receivable balance. No single customer accounted for more than 10% of the Company’s revenue in the years ended December 31, 2019, 2018 and 2017. The Company’s note hedge transactions, entered into in connection with the Convertible Notes, as defined and further described in Note 5 – Fair Value Measurements, and its derivative financial instruments expose the Company to credit risk to the extent that its counterparties may be unable to meet the terms of the transactions. The Company mitigates this risk by limiting its counterparties to major financial institutions and using multiple financial institutions as counterparties in its hedge transactions.
Accounts Receivable, Net Accounts Receivable, Net The Company records accounts receivable at the invoiced amount. The Company maintains an allowance for doubtful accounts to reserve for potentially uncollectible receivable amounts. In evaluating the Company’s ability to collect outstanding receivable balances, the Company considers various factors including the age of the balance, the creditworthiness of the customer, which is assessed based on ongoing credit evaluations and payment history, and the customer’s current financial condition.
Property and Equipment, Net Property and Equipment, Net Property and equipment are stated at cost and depreciated using the straight-line method over the estimated useful lives of the assets. Leasehold improvements are amortized using the straight-line method over the shorter of the lease term or the estimated useful life. The estimated useful lives of property and equipment are described below: Property and Equipment Estimated Useful Life Computer hardware, networking and office equipment Three Computer software Up to five Furniture and fixtures Five years Leasehold improvements Lesser of estimated useful life or remaining lease term The Company reviews the remaining estimated useful lives of its property and equipment on an ongoing basis. Management is required to use judgment in determining the estimated useful lives of such assets. Changes in circumstances such as technological advances, changes to the Company’s business model, changes in the Company’s business strategy, or changes in the planned use of property and equipment could result in the actual useful lives differing from the Company’s current estimates. In cases where the Company determines that the estimated useful life of property and equipment should be shortened or extended, the Company would apply the new estimated useful life prospectively. The Company reviews property and equipment for impairment when events or circumstances indicate the carrying amount may not be recoverable. Costs of maintenance and repairs that do not improve or extend the lives of the respective assets are expensed as incurred. Upon retirement or sale, the cost and related accumulated depreciation are removed from the balance sheet and the resulting gain or loss is reflected in operating expenses.
Capitalization of Interest Capitalization of InterestInterest costs are capitalized for assets that are constructed for the Company’s own internal use, including internally developed software and property and equipment, for the period of time to get them ready for their intended use.
Goodwill Goodwill Goodwill represents the excess of the purchase price over the fair value of the net tangible and intangible assets acquired in a business combination. Goodwill is not amortized, but is tested for impairment at least annually or more frequently if events or changes in circumstances indicate that the asset may be impaired. The Company’s impairment tests are based on a single operating segment and reporting unit structure. If the carrying value of the reporting unit exceeds its fair value, an impairment charge is recognized for the excess of the carrying value of the reporting unit over its fair value.
Intangible Assets Intangible AssetsIntangible assets are carried at cost and amortized on a straight-line basis over their estimated useful lives of up to eleven years. The Company reviews identifiable amortizable intangible assets to be held and used for impairment whenever events or changes in circumstances indicate that the carrying value of the assets may not be recoverable. Determination of recoverability is based on the lowest level of identifiable estimated undiscounted cash flows resulting from use of the asset and its eventual disposition. Measurement of any impairment loss is based on the excess of the carrying value of the asset over its fair value.
Fair Value Measurements Fair Value Measurements The Company classifies and discloses assets and liabilities measured at fair value on a recurring basis, as well as fair value measurements of assets and liabilities measured on a nonrecurring basis in periods subsequent to initial measurement, in a three-tier fair value hierarchy as described below. Fair value is defined as the exchange price that would be received for an asset or paid to transfer a liability in the principal or most advantageous market for the asset or liability in an orderly transaction between market participants on the measurement date. Valuation techniques used to measure fair value must maximize the use of observable inputs and minimize the use of unobservable inputs. The three levels of inputs that may be used to measure fair value are as follows: Level 1—Observable inputs, such as quoted prices in active markets for identical assets or liabilities. Level 2—Observable inputs other than Level 1 prices, such as quoted prices for similar assets or liabilities, quoted prices in markets that are not active or other inputs that are observable or can be corroborated by observable market data for substantially the full term of the assets or liabilities. Level 3—Unobservable inputs that are supported by little or no market activity and that are significant to the fair value of the assets or liabilities.
Internal Use Software and Website Development Costs Internal Use Software and Website Development Costs The Company capitalizes certain costs incurred in developing software programs or websites for internal use. In the years ended December 31, 2019, 2018 and 2017, the Company capitalized costs totaling approximately $127.5 million, $121.0 million and $113.9 million, respectively. Capitalized internal use software development costs are included in property and equipment, net. Included in the capitalized amounts above are $37.5 million, $41.4 million and $51.8 million of stock-based compensation expense in the years ended December 31, 2019, 2018 and 2017, respectively.
Income Taxes Income Taxes The Company is subject to income taxes in the United States and several foreign jurisdictions. Significant judgment is required in determining its provision (benefit) for income taxes and income tax assets and liabilities, including evaluating uncertainties in the application of accounting principles and complex tax laws. The Company records a provision (benefit) for income taxes for the anticipated tax consequences of the reported results of operations using the asset and liability method. Under this method, the Company recognizes deferred income tax assets and liabilities for the expected future tax consequences of temporary differences between the financial reporting and tax bases of assets and liabilities, as well as for loss and tax credit carryforwards. Deferred tax assets and liabilities are measured using the tax rates that are expected to apply to taxable income for the years in which those tax assets and liabilities are expected to be realized or settled. The Company recognizes the deferred income tax effects of a change in tax rates in the period of the enactment. The Company records a valuation allowance to reduce its deferred tax assets to the net amount that it believes is more likely than not to be realized. The Company recognizes tax benefits from uncertain tax positions only if it believes that it is more likely than not that the tax position will be sustained on examination by the taxing authorities based on the technical merits of the position. Although the Company believes it has adequately reserved for its uncertain tax positions (including net interest and penalties), it can provide no assurance that the final tax outcome of these matters will not be different. The Company makes adjustments to these reserves in accordance with income tax accounting guidance when facts and circumstances change, such as the closing of a tax audit. To the extent that the final tax outcome of these matters is different from the amounts recorded, such differences may impact the provision (benefit) for income taxes in the period in which such determination is made. The Company records interest and penalties related to its uncertain tax positions in the provision (benefit) for income taxes. The establishment of deferred tax assets from intra-entity transfers of intangible assets requires management to make significant estimates and assumptions to determine the fair value of such intangible assets. Critical estimates in valuing the intangible assets include, but are not limited to, internal revenue and expense forecasts, the estimated life of the intangible assets, and discount rates. The discount rates used in the income method to discount expected future cash flows to present value are adjusted to reflect the inherent risks related to the cash flow. Although the Company believes the assumptions and estimates it has made are reasonable and appropriate, they are based, in part, on historical experience and are inherently uncertain. Unanticipated events and circumstances may occur that could affect either the accuracy or validity of such assumptions, estimates or actual results.
Foreign Currency Foreign Currency The functional currency of the Company's foreign subsidiaries is generally the local currency. The financial statements of these subsidiaries are translated into U.S. dollars using period-end rates of exchange for assets and liabilities, historical rates of exchange for equity, and average rates of exchange for revenue and expenses. Translation gains (losses) are recorded in accumulated other comprehensive income (loss) as a component of stockholders’ equity. Unrealized foreign exchange gains and losses due to re-measurement of monetary assets and liabilities denominated in non-functional currencies as well as realized foreign exchange gains and losses on foreign exchange transactions are recorded in other income (expense), net in the accompanying consolidated statements of operations.
Advertising Costs Advertising CostsAdvertising costs are expensed when incurred and are included in sales and marketing expense in the accompanying consolidated statements of operations.
Comprehensive Income (Loss) Comprehensive Income (Loss) Comprehensive income (loss) consists of two components, net income (loss) and other comprehensive income (loss). Other comprehensive income (loss) refers to gains and losses that are recorded as an element of stockholders’ equity and are excluded from net income (loss). The Company’s other comprehensive income (loss) is comprised of unrealized gains or losses on available-for-sale securities, net of tax, and foreign currency translation adjustments.
Recent Accounting Pronouncements Recent Accounting Pronouncements Recently adopted accounting pronouncements In February 2016, the Financial Accounting Standards Board (“FASB”) issued a new accounting standard update on leases. The new guidance requires lessees to recognize right-of-use (“ROU”) assets and lease liabilities for operating leases, initially measured at the present value of the lease payments, on the consolidated balance sheets. In addition, it requires lessees to recognize a single lease cost, calculated so that the cost of the lease is allocated over the lease term, generally on a straight-line basis. The FASB has subsequently issued additional updates that allow entities to apply certain practical expedients upon transition to this new guidance. The Company adopted this guidance as of January 1, 2019 and elected to apply practical expedients permitted under the transition guidance that allow the Company to use the beginning of the period of adoption (January 1, 2019) as the date of initial application, to not separate non-lease components from lease components for lessee and lessor transactions, and to not reassess lease classification, treatment of initial direct costs, or whether an existing or expired contract contains a lease. Prior period financial statements were not recast under the new guidance. The adoption of the new lease standard resulted in the recognition of operating lease ROU assets of $737.7 million recorded in operating lease right-of-use assets and lease liabilities of $777.1 million recorded in operating lease liabilities, short-term and operating lease liabilities, long-term on the consolidated balance sheets as of January 1, 2019. In connection with the adoption of this standard, deferred rent of $53.0 million, which was previously recorded in accrued and other current liabilities and in other long-term liabilities on the consolidated balance sheets, was derecognized. Additionally, prepaid rents of $13.6 million which were previously recorded in prepaid expenses and other current assets on the consolidated balance sheets were reclassified upon adoption as a reduction to operating lease liabilities, short-term. In March 2017, the FASB issued a new accounting standard update on shortening the premium amortization period for purchased non-contingently callable debt securities. The new guidance shortens the amortization period for the premium on purchased non-contingently callable debt securities to the earliest call date. Prior to this guidance, entities generally amortized the premium as a yield adjustment over the contractual life of the security. The Company adopted this new accounting standard as of January 1, 2019 and the adoption did not have a material impact on the Company’s financial statements. In February 2018, the FASB issued a new accounting standard update to give entities the option to reclassify tax effects stranded in accumulated other comprehensive income as a result of tax reform to retained earnings (accumulated deficit). The new guidance also requires entities to make additional disclosures, regardless of whether reclassification of tax effects is elected. The Company adopted this new accounting standard during the three months ended March 31, 2019 and did not elect the option to reclassify tax effects as a result of tax reform and as such, adoption did not have a material impact on the Company’s financial statements and related disclosures. Recently issued accounting pronouncements not yet adopted In June 2016, the FASB issued a new accounting standard update on the measurement of credit losses on financial instruments. The new guidance requires financial assets measured at amortized cost to be presented at the net amount expected to be collected and available-for-sale debt securities to record credit losses through an allowance for credit losses. This guidance will be effective for fiscal years, and interim periods within those fiscal years, beginning after December 15, 2019. Adoption is not expected to have a material impact on the Company’s financial statements and related disclosures. In August 2018, the FASB issued a new accounting standard update which eliminates, adds and modifies certain disclosure requirements for fair value measurements. The update eliminates the requirement to disclose the amount of and reasons for transfers between Level 1 and Level 2 of the fair value hierarchy, and introduces a requirement to disclose the range and weighted average used to develop significant unobservable inputs for Level 3 fair value measurements. This guidance will be effective for fiscal years, and interim periods within those fiscal years, beginning after December 15, 2019. Adoption is not expected to have a material impact on the Company’s financial statements and related disclosures. In August 2018, the FASB issued a new accounting standard update requiring a customer in a cloud computing arrangement (i.e., hosting arrangement) that is a service contract to capitalize certain implementation costs as if the arrangement was an internal-use software project. Capitalized implementation costs related to a hosting arrangement that is a service contract will be amortized over the term of the hosting arrangement, beginning when the module or component of the hosting arrangement is ready for its intended use. This guidance will be effective for fiscal years, and interim periods within those fiscal years, beginning after December 15, 2019. The Company will adopt the guidance prospectively to all implementation costs incurred after the date of adoption. In December 2019, the FASB issued a new accounting standard update to simplify the accounting for income taxes. The new guidance removes certain exceptions for recognizing deferred taxes for investments, performing intraperiod allocation and calculating income taxes in interim periods. It also adds guidance to reduce complexity in certain areas, including recognizing deferred taxes for tax goodwill and allocating taxes to members of a consolidated group. This guidance will be effective for fiscal years, and interim periods within those fiscal years, beginning after December 15, 2021. The Company is currently evaluating the impact of the new guidance on its consolidated financial statements and related disclosures.

Summary of Significant Accoun_3

Summary of Significant Accounting Policies (Tables) 12 Months Ended
Dec. 31, 2019
Accounting Policies [Abstract]
Schedule of Estimated Useful Lives of Property and Equipment The estimated useful lives of property and equipment are described below: Property and Equipment Estimated Useful Life Computer hardware, networking and office equipment Three Computer software Up to five Furniture and fixtures Five years Leasehold improvements Lesser of estimated useful life or remaining lease term The following table presents the detail of property and equipment, net for the periods presented (in thousands): December 31, December 31, Property and equipment, net Equipment $ 1,445,003 $ 1,185,270 Furniture and leasehold improvements 347,983 328,532 Capitalized software 688,894 554,962 Construction in progress 100,551 96,488 Total 2,582,431 2,165,252 Less: Accumulated depreciation and amortization (1,550,650) (1,280,174) Property and equipment, net $ 1,031,781 $ 885,078

Revenue (Tables)

Revenue (Tables) 12 Months Ended
Dec. 31, 2019
Revenue from Contract with Customer [Abstract]
Revenue from External Customers by Products and Services Revenue by geography is based on the billing address of the customers. The following table sets forth revenue by services and revenue by geographic area (in thousands): Year Ended December 31, 2019 2018 2017 (1) Revenue by services: Advertising services $ 2,993,392 $ 2,617,397 $ 2,109,987 Data licensing and other 465,937 424,962 333,312 Total revenue $ 3,459,329 $ 3,042,359 $ 2,443,299
Revenue by Geographic Area Year Ended December 31, 2019 2018 2017 (1) Revenue by geographic area: United States $ 1,944,022 $ 1,642,259 $ 1,413,614 Japan 537,021 507,970 343,741 Rest of World 978,286 892,130 685,944 Total revenue $ 3,459,329 $ 3,042,359 $ 2,443,299 (1) Amounts prior to January 1, 2018 have not been adjusted due to adoption of the new revenue standard under the modified retrospective method.
Summary of Contract Balances The following table presents contract balances (in thousands): December 31, December 31, Unbilled Revenue $ 27,691 $ 20,786 Deferred Revenue $ 69,000 $ 38,949
Summary of Revenue Expected to Recognize on Remaining Performance Obligations Over the Time Periods The Company expects to recognize this amount as revenue over the following time periods (in thousands): Remaining Performance Obligations 2020 2021 2022 and Thereafter Revenue expected to be recognized on remaining performance obligations $ 634,724 $ 262,674 $ 190,475 $ 181,575

Cash, Cash Equivalents and Sh_2

Cash, Cash Equivalents and Short-term Investments (Tables) 12 Months Ended
Dec. 31, 2019
Cash and Cash Equivalents [Abstract]
Cash, Cash and Equivalents and Short-term Investments Cash, cash equivalents and short-term investments consist of the following (in thousands): December 31, December 31, Cash and cash equivalents: Cash $ 254,405 $ 229,924 Money market funds 465,158 861,206 Corporate notes, commercial paper and certificates of deposit 1,079,519 803,314 Total cash and cash equivalents $ 1,799,082 $ 1,894,444 Short-term investments: U.S. government and agency securities including treasury bills $ 660,860 $ 1,053,408 Corporate notes, commercial paper and certificates of deposit 4,179,110 3,261,549 Total short-term investments $ 4,839,970 $ 4,314,957
Contractual Maturities of Securities Classified as Available-for-Sale The contractual maturities of securities classified as available-for-sale as of December 31, 2019 were as follows (in thousands): December 31, Due within one year $ 2,810,876 Due after one year through five years 2,029,094 Total $ 4,839,970
Summary of Unrealized Gains and Losses Related to Available-for-Sale Securities Classified as Short-term Investments The following tables summarize unrealized gains and losses related to available-for-sale securities classified as short-term investments on the Company’s consolidated balance sheets (in thousands): December 31, 2019 Gross Gross Gross Aggregated U.S. government and agency securities including treasury bills $ 660,361 $ 1,049 $ (550) $ 660,860 Corporate notes, commercial paper and certificates of deposit 4,166,203 13,133 (226) 4,179,110 Total available-for-sale securities classified as short-term investments $ 4,826,564 $ 14,182 $ (776) $ 4,839,970 December 31, 2018 Gross Gross Gross Aggregated U.S. government and agency securities including treasury bills $ 1,053,988 $ 41 $ (621) $ 1,053,408 Corporate notes, commercial paper and certificates of deposit 3,265,012 713 (4,176) 3,261,549 Total available-for-sale securities classified as short-term investments $ 4,319,000 $ 754 $ (4,797) $ 4,314,957

Fair Value Measurements (Tables

Fair Value Measurements (Tables) 12 Months Ended
Dec. 31, 2019
Fair Value Disclosures [Abstract]
Schedule of Financial Assets and Liabilities Measured at Fair Value on Recurring Basis The following tables set forth the fair value of the Company’s financial assets and liabilities measured at fair value on a recurring basis as of December 31, 2019 and 2018 based on the three-tier fair value hierarchy (in thousands): December 31, 2019 Level 1 Level 2 Total Assets Cash equivalents: Money market funds $ 465,158 $ — $ 465,158 Corporate notes — 8,246 8,246 Commercial paper — 1,031,825 1,031,825 Certificates of deposit — 39,448 39,448 Short-term investments: U.S. government and agency securities — 660,860 660,860 Corporate notes — 2,468,429 2,468,429 Commercial paper — 1,236,487 1,236,487 Certificates of deposit — 474,194 474,194 Other current assets: Foreign currency contracts — 3,756 3,756 Total $ 465,158 $ 5,923,245 $ 6,388,403 Liabilities Other current liabilities: Foreign currency contracts — 1,573 1,573 Total $ — $ 1,573 $ 1,573 December 31, 2018 Level 1 Level 2 Total Assets Cash equivalents: Money market funds $ 861,206 $ — $ 861,206 Corporate notes — 24,537 24,537 Commercial paper — 778,777 778,777 Short-term investments: Treasury bills — 294,128 294,128 U.S. government and agency securities — 759,280 759,280 Corporate notes — 1,713,835 1,713,835 Commercial paper — 733,999 733,999 Certificates of deposit — 813,715 813,715 Other current assets: Foreign currency contracts — 1,343 1,343 Total $ 861,206 $ 5,119,614 $ 5,980,820 Liabilities Other current liabilities: Foreign currency contracts — 3,826 3,826 Total $ — $ 3,826 $ 3,826
Schedule of Fair Values of Outstanding Derivative Instruments The fair values of outstanding derivative instruments for the periods presented on a gross basis are as follows (in thousands): Balance Sheet Location December 31, December 31, Assets Foreign currency contracts not designated as hedging instruments Other current assets $ 3,756 $ 1,343 Liabilities Foreign currency contracts not designated as hedging instruments Other current liabilities $ 1,573 $ 3,826

Property and Equipment, Net (Ta

Property and Equipment, Net (Tables) 12 Months Ended
Dec. 31, 2019
Property, Plant and Equipment [Abstract]
Schedule of Property and Equipment, Net The estimated useful lives of property and equipment are described below: Property and Equipment Estimated Useful Life Computer hardware, networking and office equipment Three Computer software Up to five Furniture and fixtures Five years Leasehold improvements Lesser of estimated useful life or remaining lease term The following table presents the detail of property and equipment, net for the periods presented (in thousands): December 31, December 31, Property and equipment, net Equipment $ 1,445,003 $ 1,185,270 Furniture and leasehold improvements 347,983 328,532 Capitalized software 688,894 554,962 Construction in progress 100,551 96,488 Total 2,582,431 2,165,252 Less: Accumulated depreciation and amortization (1,550,650) (1,280,174) Property and equipment, net $ 1,031,781 $ 885,078

Operating and Finance Leases (T

Operating and Finance Leases (Tables) 12 Months Ended
Dec. 31, 2019
Leases [Abstract]
Lease, Cost The components of lease cost for the year ended December 31, 2019 were as follows (in thousands): Year Ended 2019 Operating lease cost $ 173,005 Finance lease cost Depreciation expense 63,674 Interest on lease liabilities 2,125 Total finance lease cost 65,799 Short-term lease cost 3,000 Variable lease cost 49,456 Sublease income (22,326) Total lease cost $ 268,934
Other Information Related To Leases Other information related to leases was as follows (in thousands): Year Ended 2019 Supplemental Cash Flows Information Cash paid for amounts included in the measurement of lease liabilities: Operating cash flows from operating leases $ 165,093 Operating cash flows from finance leases $ 2,125 Financing cash flows from finance leases $ 66,677 Right-of-use assets obtained in exchange for lease obligations: Operating leases $ 110,522 Finance leases $ — December 31, Lease Term and Discount Rate Weighted-average remaining lease term (years): Operating leases 6.6 Finance leases 0.7 Weighted-average discount rate: Operating leases 4.3 % Finance leases 3.7 %
Lessee, Operating Lease, Liability, Maturity Future lease payments under leases and sublease income as of December 31, 2019 were as follows (in thousands): Operating Finance Total Sublease Year Ending December 31, 2020 $ 180,183 $ 23,845 $ 204,028 $ (11,704) 2021 168,456 569 169,025 (8,771) 2022 153,244 — 153,244 (1,318) 2023 115,047 — 115,047 — 2024 111,615 — 111,615 — Thereafter 421,013 — 421,013 — Total future lease payments (receipts) 1,149,558 24,414 1,173,972 $ (21,793) Less: leases not yet commenced (269,886) — (269,886) Less: imputed interest (123,468) (733) (124,201) Total lease liabilities $ 756,204 $ 23,681 $ 779,885 Reconciliation of lease liabilities as shown in the consolidated balance sheets Operating lease liabilities, short-term $ 146,959 $ — $ 146,959 Operating lease liabilities, long-term 609,245 — 609,245 Finance lease liabilities, short-term — 23,476 23,476 Finance lease liabilities, long-term — 205 205 Total lease liabilities $ 756,204 $ 23,681 $ 779,885
Finance Lease, Liability, Maturity Future lease payments under leases and sublease income as of December 31, 2019 were as follows (in thousands): Operating Finance Total Sublease Year Ending December 31, 2020 $ 180,183 $ 23,845 $ 204,028 $ (11,704) 2021 168,456 569 169,025 (8,771) 2022 153,244 — 153,244 (1,318) 2023 115,047 — 115,047 — 2024 111,615 — 111,615 — Thereafter 421,013 — 421,013 — Total future lease payments (receipts) 1,149,558 24,414 1,173,972 $ (21,793) Less: leases not yet commenced (269,886) — (269,886) Less: imputed interest (123,468) (733) (124,201) Total lease liabilities $ 756,204 $ 23,681 $ 779,885 Reconciliation of lease liabilities as shown in the consolidated balance sheets Operating lease liabilities, short-term $ 146,959 $ — $ 146,959 Operating lease liabilities, long-term 609,245 — 609,245 Finance lease liabilities, short-term — 23,476 23,476 Finance lease liabilities, long-term — 205 205 Total lease liabilities $ 756,204 $ 23,681 $ 779,885
Schedule of Future Minimum Rental Payments for Operating Leases Future lease payments under leases and sublease income as of December 31, 2018 were as follows (in thousands): Operating Sublease Finance Year Ending December 31, 2019 $ 161,932 $ (24,312) $ 70,506 2020 151,751 (15,144) 23,845 2021 110,853 (11,762) 569 2022 89,398 (1,319) — 2023 62,137 — — Thereafter 263,441 — — $ 839,512 $ (52,537) 94,920 Less: Amounts representing interest 2,480 Total finance lease obligation 92,440 Less: Short-term portion 68,046 Long-term portion $ 24,394
Schedule of Future Minimum Lease Payments for Capital Leases Future lease payments under leases and sublease income as of December 31, 2018 were as follows (in thousands): Operating Sublease Finance Year Ending December 31, 2019 $ 161,932 $ (24,312) $ 70,506 2020 151,751 (15,144) 23,845 2021 110,853 (11,762) 569 2022 89,398 (1,319) — 2023 62,137 — — Thereafter 263,441 — — $ 839,512 $ (52,537) 94,920 Less: Amounts representing interest 2,480 Total finance lease obligation 92,440 Less: Short-term portion 68,046 Long-term portion $ 24,394

Goodwill and Intangible Assets

Goodwill and Intangible Assets (Tables) 12 Months Ended
Dec. 31, 2019
Goodwill and Intangible Assets Disclosure [Abstract]
Schedule of Goodwill Activities The following table presents the goodwill activities for the periods presented (in thousands): Goodwill Balance as of December 31, 2018 $ 1,227,269 Acquisition 27,428 Other 2,002 Balance as of December 31, 2019 $ 1,256,699
Schedule of Intangible Assets The following table presents the detail of intangible assets for the periods presented (in thousands): Gross Carrying Accumulated Net Carrying December 31, 2019: Patents and developed technologies $ 96,636 $ (41,530) $ 55,106 Total $ 96,636 $ (41,530) $ 55,106 December 31, 2018: Patents and developed technologies $ 93,211 $ (48,806) $ 44,405 Publisher and advertiser relationships 9,300 (8,680) 620 Total $ 102,511 $ (57,486) $ 45,025
Schedule of Estimated Future Amortization Expenses Estimated future amortization expense as of December 31, 2019 is as follows (in thousands): 2020 $ 16,210 2021 11,753 2022 6,733 2023 6,026 2024 6,026 Thereafter 8,358 Total $ 55,106

Accrued and Other Current Lia_2

Accrued and Other Current Liabilities (Tables) 12 Months Ended
Dec. 31, 2019
Payables and Accruals [Abstract]
Accrued and Other Liabilities The following table presents the detail of accrued and other current liabilities for the periods presented (in thousands): December 31, December 31, Accrued compensation $ 190,465 $ 155,830 Accrued tax liabilities 45,967 39,729 Accrued publisher, content and ad network costs 45,265 33,014 Deferred revenue 68,987 38,949 Accrued other 150,209 138,229 Total $ 500,893 $ 405,751

Senior Notes and Convertible _2

Senior Notes and Convertible Notes (Tables) 12 Months Ended
Dec. 31, 2019
Debt Disclosure [Abstract]
Components of Notes The Notes consisted of the following (in thousands): December 31, 2019 December 31, 2018 2021 Notes 2024 Notes 2027 Notes 2019 Notes 2021 Notes 2024 Notes Principal amounts: Principal $ 954,000 $ 1,150,000 $ 700,000 $ 935,000 $ 954,000 $ 1,150,000 Unamortized debt discount and issuance costs (1) (84,652) (202,515) (8,033) (37,672) (130,232) (242,846) Net carrying amount $ 869,348 $ 947,485 $ 691,967 $ 897,328 $ 823,768 $ 907,154 Carrying amount of the equity component (2) $ 283,283 $ 254,981 $ — $ 222,826 $ 283,283 $ 254,981 (1) Included in the consolidated balance sheets within convertible notes and senior notes, and amortized over the remaining lives of the Notes. (2) Included in the consolidated balance sheets within additional paid-in capital.

Net Income (Loss) Per Share (Ta

Net Income (Loss) Per Share (Tables) 12 Months Ended
Dec. 31, 2019
Earnings Per Share [Abstract]
Basic and Diluted Net Loss Per Share The following table presents the calculation of basic and diluted net loss per share for periods presented (in thousands, except per share data). Year Ended December 31, 2019 2018 2017 Basic net income (loss) per share: Numerator Net income (loss) $ 1,465,659 $ 1,205,596 $ (108,063) Denominator Weighted-average common shares outstanding 772,663 756,916 736,607 Weighted-average restricted stock subject to repurchase (1,934) (2,590) (3,905) Weighted-average shares used to compute basic net income (loss) per share 770,729 754,326 732,702 Basic net income (loss) per share attributable to common stockholders $ 1.90 $ 1.60 $ (0.15) Diluted net income (loss) per share: Numerator Net income (loss) $ 1,465,659 $ 1,205,596 $ (108,063) Denominator Number of shares used in basic computation 770,729 754,326 732,702 Weighted-average effect of dilutive securities: RSUs 10,468 13,285 — Stock options 2,496 2,686 — Other 1,838 2,389 — Weighted-average shares used to compute diluted net income (loss) per share 785,531 772,686 732,702 Diluted net income (loss) per share attributable to common stockholders $ 1.87 $ 1.56 $ (0.15)
Summary of Potential Common Shares Excluded from Calculation of Diluted Net Loss Per Share Attributable to Common Stockholders The following number of potential common shares at the end of each period were excluded from the calculation of diluted net income (loss) per share attributable to common stockholders because their effect would have been anti-dilutive for the periods presented (in thousands): Year Ended December 31, 2019 2018 2017 RSUs 12,117 14,949 33,123 Warrants 42,246 44,454 24,329 Stock options 3 837 4,793 Shares subject to repurchase and others 1,284 1,951 5,879

Common Stock and Stockholders_2

Common Stock and Stockholders' Equity (Tables) 12 Months Ended
Dec. 31, 2019
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]
Summary of Restricted Stock Activity The activities for the restricted common stock issued to employees for the year ended December 31, 2019 are summarized as follows (in thousands, except per share data): Number of Weighted-Average Unvested restricted common stock at December 31, 2018 2,238 $ 19.50 Granted 471 $ 33.90 Vested (1,278) $ 19.49 Canceled (3) $ 18.23 Unvested restricted common stock at December 31, 2019 1,428 $ 24.26
Summary of Stock Option Activity A summary of stock option activity for the year ended December 31, 2019 is as follows (in thousands, except years and per share data): Options Outstanding Number of Weighted- Weighted- Aggregate Outstanding at December 31, 2018 3,692 $ 8.88 3.64 $ 73,581 Options granted and assumed in connection with acquisitions — $ — Options exercised (361) $ 2.32 Options canceled (104) $ 1.75 Outstanding at December 31, 2019 3,227 $ 9.84 2.65 $ 74,630 Exercisable at December 31, 2019 3,211 $ 9.98 2.63 $ 74,250
Summary of RSU Activity The following table summarizes the activity related to the Company’s RSUs, excluding PRSUs and TSR RSUs, for the year ended December 31, 2019. For purposes of this table, vested RSUs represent the shares for which the service condition had been fulfilled as of each respective date (in thousands, except per share data): RSUs Outstanding Shares Weighted- Unvested and outstanding at December 31, 2018 30,387 $ 24.97 Granted 17,291 $ 33.73 Vested (12,646) $ 24.74 Canceled (3,301) $ 25.89 Unvested and outstanding at December 31, 2019 31,731 $ 29.74
Compensation Expense Allocated Total stock-based compensation expense by function is as follows (in thousands): Year Ended December 31, 2019 2018 2017 Cost of revenue $ 22,797 $ 17,289 $ 23,849 Research and development 209,063 183,799 240,833 Sales and marketing 85,739 71,305 94,135 General and administrative 60,426 53,835 74,989 Total stock-based compensation expense $ 378,025 $ 326,228 $ 433,806
PRSUs
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]
Summary of RSU Activity The following table summarizes the activity related to the Company’s PRSUs for the year ended December 31, 2019 (in thousands, except per share data): PRSUs Outstanding Shares Weighted- Unvested and outstanding at December 31, 2018 390 $ 35.55 Granted (100% target level) 646 $ 31.52 Additional earned performance shares related to 2018 grants 362 $ 35.55 Vested (193% target level) (752) $ 35.55 Unvested and outstanding at December 31, 2019 646 $ 31.52
TSR RSUs
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]
Summary of RSU Activity The following table summarizes the activity related to the Company’s TSR RSUs for the year ended December 31, 2019 (in thousands, except per share data): TSR RSUs Outstanding Shares Weighted- Unvested and outstanding at December 31, 2018 420 $ 45.78 Granted (100% target level) 431 $ 30.60 Additional earned performance shares related to 2018 grants 30 $ 13.02 Vested (132% target level) (122) $ 13.02 Unvested and outstanding at December 31, 2019 759 $ 41.15

Income Taxes (Tables)

Income Taxes (Tables) 12 Months Ended
Dec. 31, 2019
Income Tax Disclosure [Abstract]
Summary of Domestic and Foreign Components of Income (Loss) Before Income Taxes The domestic and foreign components of income (loss) before income taxes for the years ended December 31, 2019, 2018 and 2017 are as follows (in thousands): Year Ended December 31, 2019 2018 2017 Domestic $ 317,135 $ 193,500 $ (18,412) Foreign 73,004 230,044 (77,006) Income (loss) before income taxes $ 390,139 $ 423,544 $ (95,418)
Components of Provision (Benefit) for Income Taxes The components of the provision (benefit) for income taxes for the years ended December 31, 2019, 2018 and 2017 are as follows (in thousands): Year Ended December 31, 2019 2018 2017 Current: Federal $ 563 $ (1,661) $ 1,977 State 3,375 4,083 316 Foreign 43,053 17,246 16,767 Total current provision for income taxes 46,991 19,668 19,060 Deferred: Federal 2,023 (711,084) (4,701) State 2,050 (49,047) (67) Foreign (1,126,584) (41,589) (1,647) Total deferred benefit for income taxes (1,122,511) (801,720) (6,415) Provision (benefit) for income taxes $ (1,075,520) $ (782,052) $ 12,645
Schedule of Reconciliation of Statutory Federal Income Tax Rate to Effective Tax Rate The following is a reconciliation of the statutory federal income tax rate to the Company’s effective tax rate for the years ended December 31, 2019, 2018 and 2017: Year Ended December 31, 2019 2018 2017 Tax at federal statutory rate 21.0 % 21.0 % 35.0 % State taxes, net of federal benefit 1.1 (8.4) (0.3) Stock-based compensation (4.9) (6.4) (28.5) Research and development credits (8.5) (5.6) 18.6 Valuation allowance (0.2) (179.1) 425.2 Effect of the U.S. Tax Act 0.0 0.0 (369.8) Nondeductible other expenses 3.1 0.2 (8.7) Deferred tax asset on intra-entity transfer of intangible assets (308.4) 0.0 0.0 Foreign rate differential 20.3 (6.4) (81.2) Other 0.8 0.1 (3.6) Effective tax rate (275.7) % (184.6) % (13.3) %
Schedule of Tax Effects of Temporary Differences and Related Deferred Tax Assets and Liabilities The tax effects of temporary differences and related deferred tax assets and liabilities as of December 31, 2019 and 2018 are as follows (in thousands): December 31, 2019 2018 Deferred tax assets: Net operating loss carryforwards $ 390,005 $ 513,427 Accruals and reserves 37,172 32,298 Stock-based compensation expense 32,573 29,600 Tax credits 425,011 375,699 Capitalized research expenditures 1,679 13,868 Fixed assets and intangible assets 1,214,070 24,819 Investments 15,560 16,571 Operating lease liability 170,817 — Other 3,131 17,658 Total deferred tax assets 2,290,018 1,023,940 Valuation allowance (223,775) (210,862) Total deferred tax assets, net of valuation allowance 2,066,243 813,078 Deferred tax liabilities: Operating lease right-of-use asset (157,845) — Other (1,138) (4,619) Total deferred tax liabilities (158,983) (4,619) Net deferred tax assets $ 1,907,260 $ 808,459
Schedule of Reconciliation of Beginning and Ending Amount of Unrecognized Tax Benefit A reconciliation of the beginning and ending amount of unrecognized tax benefit is as follows (in thousands): Year Ended December 31, 2019 2018 2017 Gross unrecognized tax benefits at the beginning of the year $ 332,314 $ 259,781 $ 269,508 Increases related to prior year tax positions 54,743 20,000 913 Decreases related to prior year tax positions (2,537) (13,174) — Decreases related to settlement with tax authorities — — (1,415) Decreases related to the Tax Act — — (71,104) Increases related to current year tax positions 35,338 66,249 61,879 Statute of limitations expirations — (542) — Gross unrecognized tax benefits at the end of the year $ 419,858 $ 332,314 $ 259,781
Summary of Unrecognized Tax Benefits Recorded in Balance Sheet Total unrecognized tax benefits are recorded on the Company’s consolidated balance sheets as follows (in thousands): December 31, 2019 2018 Total unrecognized tax benefits balance $ 419,858 $ 332,314 Amounts netted against related deferred tax assets (401,818) (317,524) Unrecognized tax benefits recorded on consolidated balance sheets $ 18,040 $ 14,790

Commitments and Contingencies (

Commitments and Contingencies (Tables) 12 Months Ended
Dec. 31, 2019
Commitments and Contingencies Disclosure [Abstract]
Summary of Commitments to Settle Contractual Obligations in Cash The following table summarizes its commitments to settle contractual obligations in cash as of December 31, 2019: Payments Due by Year Total 2020 2021-2022 2023-2024 Thereafter (In thousands) 2021 Notes $ 973,106 $ 9,566 $ 963,540 $ — $ — 2024 Notes 1,162,914 2,875 5,734 1,154,305 — 2027 Notes 917,446 27,626 54,213 54,287 781,320 Operating lease obligations (1) 1,149,558 180,183 321,700 226,662 421,013 Finance lease obligations 24,414 23,845 569 — — Other contractual commitments (2) 458,400 125,523 224,089 99,597 9,191 Total contractual obligations $ 4,685,838 $ 369,618 $ 1,569,845 $ 1,534,851 $ 1,211,524 (1) The Company has entered into several sublease agreements for office space that it is not fully utilizing. Under the sublease agreements, the Company will receive approximately $21.8 million in sublease income over the next three years. (2) Other contractual commitments are non-cancelable contractual commitments primarily related to the Company’s infrastructure services, bandwidth and other services arrangements.

Segment Information and Opera_2

Segment Information and Operations by Geographic Area (Tables) 12 Months Ended
Dec. 31, 2019
Segment Reporting [Abstract]
Property and Equipment Net by Geographic Area The following table sets forth property and equipment, net by geographic area (in thousands): December 31, December 31, Property and equipment, net: United States $ 999,552 $ 853,731 International 32,229 31,347 Total property and equipment, net $ 1,031,781 $ 885,078

Summary of Significant Accoun_4

Summary of Significant Accounting Policies - Additional Information (Details) - USD ($) 12 Months Ended
Dec. 31, 2019 Dec. 31, 2018 Dec. 31, 2017 Jan. 01, 2019
Significant Accounting Policies [Line Items]
Operating lease,option to terminate, early termination period 1 year
Interest earned on cash, cash equivalent and marketable securities $ 157,703,000 $ 111,221,000 $ 44,383,000
Capitalized interest expenses 4,600,000 3,700,000 3,600,000
Impairment charges on goodwill $ 0 0 0
Intangible assets, estimated useful lives 11 years
Impairment charges on intangible assets $ 0 0 0
Software developing program costs capitalized 127,500,000 121,000,000 113,900,000
Amortization of capitalized costs $ 116,000,000 $ 111,800,000 $ 96,500,000
Federal corporate income tax rate 21.00% 21.00% 35.00%
Advertising expense $ 77,500,000 $ 78,100,000 $ 70,200,000
Operating lease right-of-use assets 697,095,000
Operating Lease, Liability 756,204,000
Accounting Standards Update 2016-02
Significant Accounting Policies [Line Items]
Operating lease right-of-use assets $ 737,700,000
Operating Lease, Liability 777,100,000
Difference Between Lease Guidance In Effect Before And After Topic842 | Accounting Standards Update 2016-02
Significant Accounting Policies [Line Items]
Deferred rent credit (53,000,000)
Prepaid Rent $ (13,600,000)
Internal Use Software and Website Development Costs
Significant Accounting Policies [Line Items]
Share-based compensation, capitalized amount $ 37,500,000 $ 41,400,000 $ 51,800,000
Customer Concentration Risk | Accounts Receivable
Significant Accounting Policies [Line Items]
Concentration risk percentage 10.00% 10.00% 10.00%
Customer Concentration Risk | Revenue
Significant Accounting Policies [Line Items]
Concentration risk percentage 10.00% 10.00% 10.00%
Prepaid Expenses and Other Current Assets
Significant Accounting Policies [Line Items]
Restricted cash balances $ 1,900,000 $ 1,700,000
Other assets
Significant Accounting Policies [Line Items]
Restricted cash balances $ 26,700,000 $ 25,700,000
Maximum
Significant Accounting Policies [Line Items]
Operating lease, renewal term 10 years
Maximum | Internal Use Software and Website Development Costs
Significant Accounting Policies [Line Items]
Estimated useful life 5 years
Performance Condition Awards
Significant Accounting Policies [Line Items]
Vesting condition period 1 year
Service Condition Awards
Significant Accounting Policies [Line Items]
Vesting condition period 5 years
Performance-based restricted Stock Awards
Significant Accounting Policies [Line Items]
Vesting condition period 2 years
Server And Networking Equipment Leases | Maximum
Significant Accounting Policies [Line Items]
Finance lease, term of contract 4 years
Server And Networking Equipment Leases | Minimum
Significant Accounting Policies [Line Items]
Finance lease, term of contract 3 years

Summary of Significant Accoun_5

Summary of Significant Accounting Policies - Schedule of Estimated Useful Lives of Property and Equipment (Details) 12 Months Ended
Dec. 31, 2019 Dec. 31, 2018
Computer hardware, networking and office equipment | Minimum
Property, Plant and Equipment [Line Items]
Estimated useful life 3 years
Computer hardware, networking and office equipment | Maximum
Property, Plant and Equipment [Line Items]
Estimated useful life 5 years
Computer software
Property, Plant and Equipment [Line Items]
Estimated useful life 5 years
Furniture and fixtures
Property, Plant and Equipment [Line Items]
Estimated useful life 5 years

Revenue - Revenue by Services a

Revenue - Revenue by Services and Revenue by Products and Services (Details) - USD ($) $ in Thousands 12 Months Ended
Dec. 31, 2019 Dec. 31, 2018 Dec. 31, 2017
Revenue:
Revenue $ 3,459,329 $ 3,042,359 $ 2,443,299
United States
Revenue:
Revenue 1,944,022 1,642,259 1,413,614
Japan
Revenue:
Revenue 537,021 507,970 343,741
Rest of World
Revenue:
Revenue 978,286 892,130 685,944
Advertising services
Revenue:
Revenue 2,993,392 2,617,397 2,109,987
Data licensing and other
Revenue:
Revenue $ 465,937 $ 424,962 $ 333,312

Revenue - Additional Informatio

Revenue - Additional Information (Details) - USD ($) $ in Thousands Jan. 01, 2018 Dec. 31, 2019 Dec. 31, 2018 Dec. 31, 2017
Revenue from Contract with Customer [Abstract]
Deferred revenue, revenue recognized $ 38,900 $ 25,900
Aggregate amount of transaction price allocated to remaining performance obligations 634,724
New Accounting Pronouncements or Change in Accounting Principle [Line Items]
Increase in unbilled revenue 27,691 20,786
Deferred Revenue 69,000 38,949
Revenue $ 3,459,329 3,042,359 $ 2,443,299
Adoption of ASC Topic 606
New Accounting Pronouncements or Change in Accounting Principle [Line Items]
Increase in unbilled revenue $ 8,000 12,600
Deferred Revenue (4,100) (3,500)
Revenue $ 16,100
Retained earnings (accumulated deficit) | Adoption of ASC Topic 606
New Accounting Pronouncements or Change in Accounting Principle [Line Items]
Cumulative-effect adjustment from adoption of revenue recognition rule $ 12,100

Revenue - Summary of Contract B

Revenue - Summary of Contract Balances (Details) - USD ($) $ in Thousands Dec. 31, 2019 Dec. 31, 2018
Revenues [Abstract]
Increase in unbilled revenue $ 27,691 $ 20,786
Deferred Revenue $ 69,000 $ 38,949

Revenue - Summary of Revenue Ex

Revenue - Summary of Revenue Expected to Recognize on Remaining Performance Obligations Over the Time Periods (Details) $ in Thousands Dec. 31, 2019USD ($)
Revenue, Remaining Performance Obligation, Expected Timing of Satisfaction [Line Items]
Revenue expected to be recognized on remaining performance obligations $ 634,724
Revenue, Remaining Performance Obligation, Expected Timing of Satisfaction, Start Date: 2020-01-01
Revenue, Remaining Performance Obligation, Expected Timing of Satisfaction [Line Items]
Revenue expected to be recognized on remaining performance obligations $ 262,674
Revenue, remaining performance obligation, expected timing of satisfaction, period 1 year
Revenue, Remaining Performance Obligation, Expected Timing of Satisfaction, Start Date: 2021-01-01
Revenue, Remaining Performance Obligation, Expected Timing of Satisfaction [Line Items]
Revenue expected to be recognized on remaining performance obligations $ 190,475
Revenue, remaining performance obligation, expected timing of satisfaction, period 1 year
Revenue, Remaining Performance Obligation, Expected Timing of Satisfaction, Start Date: 2022-01-01
Revenue, Remaining Performance Obligation, Expected Timing of Satisfaction [Line Items]
Revenue expected to be recognized on remaining performance obligations $ 181,575
Revenue, remaining performance obligation, expected timing of satisfaction, period

Cash, Cash Equivalents and Sh_3

Cash, Cash Equivalents and Short-term Investments - Cash, Cash and Equivalents and Short-term Investments (Details) - USD ($) $ in Thousands Dec. 31, 2019 Dec. 31, 2018 Dec. 31, 2017
Cash and cash equivalents:
Cash $ 254,405 $ 229,924
Cash and Cash Equivalents 1,799,082 1,894,444 $ 1,638,413
Short-term investments:
Short-term investments 4,839,970 4,314,957
Money market funds
Cash and cash equivalents:
Cash and Cash Equivalents 465,158 861,206
U.S. government and agency securities including treasury bills
Short-term investments:
Short-term investments 660,860 1,053,408
Corporate notes, commercial paper and certificates of deposit
Cash and cash equivalents:
Cash and Cash Equivalents 1,079,519 803,314
Short-term investments:
Short-term investments $ 4,179,110 $ 3,261,549

Cash, Cash Equivalents and Sh_4

Cash, Cash Equivalents and Short-term Investments - Contractual Maturities of Securities Classified as Available-for-Sale (Details) - USD ($) $ in Thousands Dec. 31, 2019 Dec. 31, 2018
Cash And Cash Equivalents And Marketable Securities [Abstract]
Due within one year $ 2,810,876
Due after one year through five years 2,029,094
Total $ 4,839,970 $ 4,314,957

Cash, Cash Equivalents and Sh_5

Cash, Cash Equivalents and Short-term Investments - Summary of Unrealized Gains and Losses Related to Available-for-Sale Securities Classified as Short-term Investments (Details) - USD ($) $ in Thousands Dec. 31, 2019 Dec. 31, 2018
Debt Securities, Available-for-sale [Line Items]
Gross Amortized Costs $ 4,826,564 $ 4,319,000
Gross Unrealized Gains 14,182 754
Gross Unrealized Losses (776) (4,797)
Aggregated Estimated Fair Value 4,839,970 4,314,957
U.S. government and agency securities including treasury bills
Debt Securities, Available-for-sale [Line Items]
Gross Amortized Costs 660,361 1,053,988
Gross Unrealized Gains 1,049 41
Gross Unrealized Losses (550) (621)
Aggregated Estimated Fair Value 660,860 1,053,408
Corporate notes, commercial paper and certificates of deposit
Debt Securities, Available-for-sale [Line Items]
Gross Amortized Costs 4,166,203 3,265,012
Gross Unrealized Gains 13,133 713
Gross Unrealized Losses (226) (4,176)
Aggregated Estimated Fair Value $ 4,179,110 $ 3,261,549

Cash, Cash Equivalents and Sh_6

Cash, Cash Equivalents and Short-term Investments - Additional Information (Details) - USD ($) 12 Months Ended
Dec. 31, 2019 Dec. 31, 2018
Investments, Debt and Equity Securities [Abstract]
Impairment loss on securities $ 0 $ 0

Fair Value Measurements - Sched

Fair Value Measurements - Schedule of Financial Assets and Liabilities Measured at Fair Value on Recurring Basis (Details) - USD ($) $ in Thousands Dec. 31, 2019 Dec. 31, 2018
Fair Value, Net Asset (Liability) [Abstract]
Short-term investments $ 4,839,970 $ 4,314,957
Other current assets 3,756 1,343
Other current liabilities 1,573 3,826
Fair Value, Measurements, Recurring
Fair Value, Net Asset (Liability) [Abstract]
Total 6,388,403 5,980,820
Total 1,573 3,826
Fair Value, Measurements, Recurring | Money market funds
Fair Value, Net Asset (Liability) [Abstract]
Cash equivalents 465,158 861,206
Fair Value, Measurements, Recurring | Treasury bills
Fair Value, Net Asset (Liability) [Abstract]
Short-term investments 294,128
Fair Value, Measurements, Recurring | U.S. government and agency securities
Fair Value, Net Asset (Liability) [Abstract]
Short-term investments 660,860 759,280
Fair Value, Measurements, Recurring | Corporate notes
Fair Value, Net Asset (Liability) [Abstract]
Cash equivalents 8,246 24,537
Short-term investments 2,468,429 1,713,835
Fair Value, Measurements, Recurring | Commercial paper
Fair Value, Net Asset (Liability) [Abstract]
Cash equivalents 1,031,825 778,777
Short-term investments 1,236,487 733,999
Fair Value, Measurements, Recurring | Certificates of deposit
Fair Value, Net Asset (Liability) [Abstract]
Cash equivalents 39,448
Short-term investments 474,194 813,715
Fair Value, Measurements, Recurring | Foreign currency contracts
Fair Value, Net Asset (Liability) [Abstract]
Other current assets 3,756 1,343
Other current liabilities 1,573 3,826
Level 1 | Fair Value, Measurements, Recurring
Fair Value, Net Asset (Liability) [Abstract]
Total 465,158 861,206
Total 0 0
Level 1 | Fair Value, Measurements, Recurring | Money market funds
Fair Value, Net Asset (Liability) [Abstract]
Cash equivalents 465,158 861,206
Level 1 | Fair Value, Measurements, Recurring | Treasury bills
Fair Value, Net Asset (Liability) [Abstract]
Short-term investments 0
Level 1 | Fair Value, Measurements, Recurring | U.S. government and agency securities
Fair Value, Net Asset (Liability) [Abstract]
Short-term investments 0 0
Level 1 | Fair Value, Measurements, Recurring | Corporate notes
Fair Value, Net Asset (Liability) [Abstract]
Cash equivalents 0 0
Short-term investments 0 0
Level 1 | Fair Value, Measurements, Recurring | Commercial paper
Fair Value, Net Asset (Liability) [Abstract]
Cash equivalents 0 0
Short-term investments 0 0
Level 1 | Fair Value, Measurements, Recurring | Certificates of deposit
Fair Value, Net Asset (Liability) [Abstract]
Cash equivalents 0
Short-term investments 0 0
Level 1 | Fair Value, Measurements, Recurring | Foreign currency contracts
Fair Value, Net Asset (Liability) [Abstract]
Other current assets 0 0
Other current liabilities 0 0
Level 2 | Fair Value, Measurements, Recurring
Fair Value, Net Asset (Liability) [Abstract]
Total 5,923,245 5,119,614
Total 1,573 3,826
Level 2 | Fair Value, Measurements, Recurring | Money market funds
Fair Value, Net Asset (Liability) [Abstract]
Cash equivalents 0 0
Level 2 | Fair Value, Measurements, Recurring | Treasury bills
Fair Value, Net Asset (Liability) [Abstract]
Short-term investments 294,128
Level 2 | Fair Value, Measurements, Recurring | U.S. government and agency securities
Fair Value, Net Asset (Liability) [Abstract]
Short-term investments 660,860 759,280
Level 2 | Fair Value, Measurements, Recurring | Corporate notes
Fair Value, Net Asset (Liability) [Abstract]
Cash equivalents 8,246 24,537
Short-term investments 2,468,429 1,713,835
Level 2 | Fair Value, Measurements, Recurring | Commercial paper
Fair Value, Net Asset (Liability) [Abstract]
Cash equivalents 1,031,825 778,777
Short-term investments 1,236,487 733,999
Level 2 | Fair Value, Measurements, Recurring | Certificates of deposit
Fair Value, Net Asset (Liability) [Abstract]
Cash equivalents 39,448
Short-term investments 474,194 813,715
Level 2 | Fair Value, Measurements, Recurring | Foreign currency contracts
Fair Value, Net Asset (Liability) [Abstract]
Other current assets 3,756 1,343
Other current liabilities $ 1,573 $ 3,826

Fair Value Measurements - Addit

Fair Value Measurements - Additional Information (Details) - USD ($) 12 Months Ended
Dec. 31, 2019 Dec. 31, 2018 Dec. 31, 2017
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items]
Notional principal of foreign currency contracts outstanding $ 456,100,000 $ 545,300,000
Net gain (losses) on foreign currency contracts (7,200,000) (11,600,000) $ 8,300,000
Senior Notes | Senior Notes Due 2027
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items]
Debt instrument, principal amount $ 700,000,000
Debt Instrument, percentage 3.875%
Senior Notes | Level 2 | Senior Notes Due 2027
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items]
Debt instrument, fair value disclosure $ 700,000,000
Convertible Notes | Senior Notes Due 2024
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items]
Debt instrument, principal amount 1,150,000,000
Convertible Notes | 2021 Notes
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items]
Debt instrument, principal amount $ 954,000,000 954,000,000
Debt Instrument, percentage 1.00%
Convertible Notes | 2024 Notes
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items]
Debt instrument, principal amount $ 1,150,000,000 $ 1,150,000,000
Debt Instrument, percentage 0.25%
Convertible Notes | Level 2 | 2021 Notes
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items]
Debt instrument, fair value disclosure $ 927,900,000
Convertible Notes | Level 2 | 2024 Notes
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items]
Debt instrument, fair value disclosure $ 1,130,000,000

Fair Value Measurements - Sch_2

Fair Value Measurements - Schedule of Fair Values of Outstanding Derivative Instruments (Details) - USD ($) $ in Thousands Dec. 31, 2019 Dec. 31, 2018
Assets
Foreign currency contracts not designated as hedging instruments $ 3,756 $ 1,343
Liabilities
Foreign currency contracts not designated as hedging instruments $ 1,573 $ 3,826

Property and Equipment, Net - S

Property and Equipment, Net - Schedule of Property and Equipment, Net (Details) - USD ($) $ in Thousands Dec. 31, 2019 Dec. 31, 2018
Property and equipment, net
Property and equipment, gross $ 2,165,252
Less: Accumulated depreciation and amortization (1,280,174)
Property and equipment, net $ 1,031,781 885,078
Total 2,582,431
Less: Accumulated depreciation and amortization (1,550,650)
Property and equipment, net 1,031,781
Equipment
Property and equipment, net
Property and equipment, gross 1,445,003 1,185,270
Furniture and leasehold improvements
Property and equipment, net
Property and equipment, gross 347,983 328,532
Capitalized software
Property and equipment, net
Property and equipment, gross 688,894 554,962
Construction in progress
Property and equipment, net
Property and equipment, gross $ 100,551 $ 96,488

Property and Equipment, Net - A

Property and Equipment, Net - Additional Information (Details) - USD ($) $ in Thousands 12 Months Ended
Dec. 31, 2019 Dec. 31, 2018 Dec. 31, 2017
Property, Plant and Equipment [Line Items]
Depreciation expense $ 63,674
Depreciation, depletion and amortization 449,000 $ 406,500 $ 349,300
Computer hardware, networking and office equipment
Property, Plant and Equipment [Line Items]
Depreciation expense $ 84,200 $ 93,600
Depreciation expense $ 63,700

Operating and Finance Leases (D

Operating and Finance Leases (Details) $ in Millions 12 Months Ended
Dec. 31, 2019USD ($)
Leases [Line Items]
Assets recorded under finance leases $ 126
Accumulated depreciation associated with finance leases 104.2
Operating lease, not yet commenced, gross commitment $ 267.4
Maximum
Leases [Line Items]
Remaining lease term 11 years
Lease expected to commence, term 10 years
Minimum
Leases [Line Items]
Remaining lease term 1 year
Lease expected to commence, term 1 year

Operating and Finance Leases -

Operating and Finance Leases - Costs (Details) $ in Thousands 12 Months Ended
Dec. 31, 2019USD ($)
Leases [Abstract]
Operating lease cost $ 173,005
Finance Lease Costs [Abstract]
Depreciation expense 63,674
Interest on lease liabilities 2,125
Total finance lease cost 65,799
Short-term lease cost 3,000
Variable lease cost 49,456
Sublease income 22,326
Total lease cost $ 268,934

Operating and Finance Leases _2

Operating and Finance Leases - Summary of Other Information Related to Leases (Details) - USD ($) $ in Thousands 12 Months Ended
Dec. 31, 2019 Dec. 31, 2018 Dec. 31, 2017
Cash paid for amounts included in the measurement of lease liabilities:
Operating cash flows from operating leases $ 165,093
Operating cash flows from finance leases 2,125
Financing cash flows from finance leases 66,677 $ 90,351 $ 102,775
Right-of-use assets obtained in exchange for lease obligations:
Operating leases 110,522
Finance leases $ 0
Weighted-average remaining lease term (years):
Operating leases 6 years 7 months 6 days
Finance leases 8 months 12 days
Weighted-average discount rate:
Operating leases 4.30%
Finance leases 3.70%

Operating and Finance Leases _3

Operating and Finance Leases - Summary of Future Lease Payments under Leases and Sublease Income (Details) - USD ($) $ in Thousands Dec. 31, 2019 Dec. 31, 2018
Operating Leases
2020 $ 180,183
2021 168,456
2022 153,244
2023 115,047
2024 111,615
Thereafter 421,013
Total future lease payments (receipts) 1,149,558
Less: leases not yet commenced (269,886)
Less: imputed interest (123,468)
Total lease liabilities 756,204
Finance Leases
2020 23,845
2021 569
2022 0
2023 0
2024 0
Thereafter 0
Total future lease payments (receipts) 24,414
Less: leases not yet commenced 0
Less: imputed interest (733)
Total lease liabilities 23,681
Total
2020 204,028
2021 169,025
2022 153,244
2023 115,047
2024 111,615
Thereafter 421,013
Total future lease payments (receipts) 1,173,972
Less: leases not yet commenced (269,886)
Less: imputed interest (124,201)
Total lease liabilities 779,885
Sublease Income
2020 (11,704)
2021 (8,771)
2022 (1,318)
2023 0
2024 0
Thereafter 0
Total (21,793) $ (52,537)
Reconciliation Of Lease Liabilities [Abstract]
Operating lease liabilities, short-term 146,959
Operating lease liabilities, long-term 609,245
Total lease liabilities 756,204
Finance lease liabilities, short-term 23,476
Finance lease liabilities, long-term 205 $ 24,394
Total lease liabilities 23,681
Total lease liabilities $ 779,885

Operating and Finance Leases _4

Operating and Finance Leases - Summary of Future Lease Payments under Leases and Sublease Income, Prior Guidance (Details) - USD ($) $ in Thousands Dec. 31, 2019 Dec. 31, 2018
Operating Leases
2019 $ 161,932
2020 151,751
2021 110,853
2022 89,398
2023 62,137
Thereafter 263,441
Total 839,512
Sublease Income
2019 (24,312)
2020 (15,144)
2021 (11,762)
2022 (1,319)
2023 0
Thereafter 0
Total $ (21,793) (52,537)
Finance Leases
2019 70,506
2020 23,845
2021 569
2022 0
2023 0
Thereafter 0
Total 94,920
Less: Amounts representing interest 2,480
Total finance lease obligation 92,440
Less: Short-term portion 68,046
Long-term portion $ 24,394

Goodwill and Intangible Asset_2

Goodwill and Intangible Assets - Schedule of Goodwill Activities (Details) $ in Thousands 12 Months Ended
Dec. 31, 2019USD ($)
Goodwill
Beginning balance $ 1,227,269
Acquisition 27,428
Other 2,002
Ending balance $ 1,256,699

Goodwill and Intangible Asset_3

Goodwill and Intangible Assets - Additional Information (Details) - USD ($) 12 Months Ended
Dec. 31, 2019 Dec. 31, 2018 Dec. 31, 2017
Finite-Lived Intangible Assets [Line Items]
Impairment charges on goodwill $ 0 $ 0 $ 0
Amortization of intangible assets 16,500,000 $ 19,000,000 $ 46,500,000
Intangible assets, written off in period $ 32,500,000
Intangible assets, estimated useful lives 11 years
Patents and developed technologies
Finite-Lived Intangible Assets [Line Items]
Intangible assets, estimated useful lives 11 years

Goodwill and Intangible Asset_4

Goodwill and Intangible Assets - Schedule of Intangible Assets (Details) - USD ($) $ in Thousands Dec. 31, 2019 Dec. 31, 2018
Finite-Lived Intangible Assets [Line Items]
Gross Carrying Value $ 96,636 $ 102,511
Accumulated Amortization (41,530) (57,486)
Total 55,106 45,025
Patents and developed technologies
Finite-Lived Intangible Assets [Line Items]
Gross Carrying Value 96,636 93,211
Accumulated Amortization (41,530) (48,806)
Total $ 55,106 44,405
Publisher and advertiser relationships
Finite-Lived Intangible Assets [Line Items]
Gross Carrying Value 9,300
Accumulated Amortization (8,680)
Total $ 620

Goodwill and Intangible Asset_5

Goodwill and Intangible Assets - Schedule of Estimated Future Amortization Expenses (Details) - USD ($) $ in Thousands Dec. 31, 2019 Dec. 31, 2018
Goodwill and Intangible Assets Disclosure [Abstract]
2020 $ 16,210
2021 11,753
2022 6,733
2023 6,026
2024 6,026
Thereafter 8,358
Total $ 55,106 $ 45,025

Accrued and Other Current Lia_3

Accrued and Other Current Liabilities - Accrued and Other Current Liabilities (Details) - USD ($) $ in Thousands Dec. 31, 2019 Dec. 31, 2018
Payables and Accruals [Abstract]
Accrued compensation $ 190,465 $ 155,830
Accrued tax liabilities 45,967 39,729
Accrued publisher, content and ad network costs 45,265 33,014
Deferred revenue 68,987 38,949
Accrued other 150,209 138,229
Total $ 500,893 $ 405,751

Acquisitions and Other Invest_2

Acquisitions and Other Investments - 2019 Acquisitions - Additional Information (Details) - USD ($) $ in Thousands 12 Months Ended
Dec. 31, 2019 Dec. 31, 2018
Business Acquisition [Line Items]
Goodwill $ 1,256,699 $ 1,227,269
Intangible assets, estimated useful lives 11 years
Other acquisitions
Business Acquisition [Line Items]
Consideration transferred $ 34,500 53,700
Purchase price cash consideration 29,900 34,600
Indemnification holdback 4,600
Liabilities (1,900)
Goodwill 27,400
Other acquisitions | Developed Technology Rights
Business Acquisition [Line Items]
Acquisition purchase price allocated to finite lived intangible assets $ 9,000 $ 9,300
Intangible assets, estimated useful lives 36 months 24 months

Acquisitions and Other Invest_3

Acquisitions and Other Investments - 2018 Acquisitions - Additional Information (Details) - USD ($) $ in Thousands 12 Months Ended
Dec. 31, 2019 Dec. 31, 2018
Business Acquisition [Line Items]
Goodwill acquired $ 27,428
Intangible assets, estimated useful lives 11 years
Other acquisitions
Business Acquisition [Line Items]
Consideration transferred $ 34,500 $ 53,700
Business acquisition, common stock issued 19,100
Purchase price cash consideration 29,900 34,600
Acquisition purchase price allocated to assets 400
Goodwill acquired 44,000
Other acquisitions | Developed Technology Rights
Business Acquisition [Line Items]
Acquisition purchase price allocated to finite lived intangible assets $ 9,000 $ 9,300
Intangible assets, estimated useful lives 36 months 24 months

Acquisitions and Other Invest_4

Acquisitions and Other Investments - Investments in Privately-Held Companies - Additional Information (Details) - USD ($) 12 Months Ended
Dec. 31, 2019 Dec. 31, 2018 Dec. 31, 2017
Schedule of Investments [Line Items]
Carrying value of investments $ 77,700,000 $ 30,200,000
Impairment charge 1,550,000 3,000,000 $ 62,439,000
Other Expense
Schedule of Investments [Line Items]
Impairment charge 1,600,000 3,000,000 $ 62,400,000
Gain on sale of investments $ 10,200,000 $ 0

Senior Notes and Convertible _3

Senior Notes and Convertible Notes - Additional Information (Details) $ / shares in Units, shares in Millions 1 Months Ended 12 Months Ended
Dec. 31, 2019USD ($)$ / shares Jun. 30, 2018USD ($)$ / sharesshares Dec. 31, 2019USD ($)$ / shares Dec. 31, 2018USD ($)Dd Dec. 31, 2017USD ($) Dec. 31, 2014USD ($)$ / shares
Debt Instrument [Line Items]
Proceeds from issuance of warrants concurrent with note hedges $ 0 $ 186,760,000 $ 0
Convertible notes, long-term $ 1,816,833,000 1,816,833,000 1,730,922,000
Repayment of convertible notes $ (935,000,000) 0 0
2024 Notes
Debt Instrument [Line Items]
Conversion price (in dollars per share) | $ / shares $ 57.14 $ 57.14
Exercise price of the warrants (in dollars per share) | $ / shares 80.20 80.20
Convertible Notes 2019 and 2021
Debt Instrument [Line Items]
Conversion price (in dollars per share) | $ / shares 77.64 77.64
Exercise price of the warrants (in dollars per share) | $ / shares $ 105.28 $ 105.28
Senior Notes | Senior Notes Due 2027
Debt Instrument [Line Items]
Debt instrument, principal amount $ 700,000,000 $ 700,000,000
Debt instrument, interest rate percentage 3.875% 3.875%
Debt issuance costs $ 8,100,000 $ 8,100,000
Percentage of principal amount redeemed 100.00%
Price percentage for repurchase of notes if repurchase option is elected 101.00%
Carrying amount of the equity component 0 $ 0
Convertible notes, long-term 691,967,000 691,967,000
Proceeds from offerings, net of transaction costs 691,900,000
Convertible Notes
Debt Instrument [Line Items]
Exercise price of the warrants (in dollars per share) | $ / shares $ 105.28
Convertible Notes | 2021 Notes
Debt Instrument [Line Items]
Debt instrument, principal amount $ 954,000,000 $ 954,000,000 954,000,000
Debt instrument, interest rate percentage 1.00% 1.00%
Carrying amount of the equity component $ 283,283,000 $ 283,283,000 $ 283,283,000
Effective interest rate for amortization to interest expense 6.25%
Number of shares authorized for repurchase under hedge agreement | shares 12.3
Purchases of convertible note hedges $ 233,500,000
Number of warrants issued | shares 12.3
Proceeds from issuance of warrants concurrent with note hedges $ 172,900,000
Remaining period for convertible debt 20 months
Convertible notes, long-term $ 869,348,000 $ 869,348,000 $ 823,768,000
Convertible Notes | 2021 Notes | Common Stock
Debt Instrument [Line Items]
Debt Instrument, conversion ratio 0.0128793
Conversion price (in dollars per share) | $ / shares $ 77.64 $ 77.64
Convertible Notes | Convertible Notes 2019 and 2021
Debt Instrument [Line Items]
Debt issuance costs $ 500,000
Debt discount 28,300,000
Proceeds from offerings, net of transaction costs $ 1,860,000,000
Convertible Notes | Convertible Notes 2019
Debt Instrument [Line Items]
Debt instrument, principal amount $ 935,000,000 $ 935,000,000
Debt instrument, interest rate percentage 0.25% 0.25%
Convertible Notes | 2024 Notes
Debt Instrument [Line Items]
Debt instrument, principal amount $ 1,150,000,000 $ 1,150,000,000 1,150,000,000
Debt instrument, interest rate percentage 0.25% 0.25%
Debt issuance costs 12,300,000
Conversion price (in dollars per share) | $ / shares $ 57.14 $ 57.14
Price percentage for repurchase of notes if repurchase option is elected 100.00%
Carrying amount of the equity component $ 254,981,000 $ 254,981,000 $ 254,981,000
Effective interest rate for amortization to interest expense 4.46%
Number of shares authorized for repurchase under hedge agreement | shares 20.1
Purchases of convertible note hedges $ 268,000,000
Number of warrants issued | shares 20.1
Exercise price of the warrants (in dollars per share) | $ / shares $ 80.20 $ 80.20 $ 80.20
Proceeds from issuance of warrants concurrent with note hedges $ 186,800,000
Remaining period for convertible debt 53 months
Convertible notes, long-term $ 947,485,000 $ 947,485,000 $ 907,154,000
Proceeds from offerings, net of transaction costs $ 1,140,000,000
Convertible Notes | 2024 Notes | Scenario One
Debt Instrument [Line Items]
Convertible debt instrument, consecutive trading days threshold | d 30
Convertible debt instrument, percentage of conversion price to trigger conversion to common stock 130.00%
Convertible Notes | 2024 Notes | Scenario One | Minimum
Debt Instrument [Line Items]
Convertible debt instrument, trading days threshold | d 20
Convertible Notes | 2024 Notes | Scenario Two
Debt Instrument [Line Items]
Convertible debt instrument, trading days threshold | D 5
Convertible debt instrument, consecutive trading days threshold | D 5
Convertible debt instrument, percentage of conversion price to trigger conversion to common stock 98.00%
Convertible Notes | 2024 Notes | Common Stock
Debt Instrument [Line Items]
Debt Instrument, conversion ratio 0.0175001
Conversion price (in dollars per share) | $ / shares $ 57.14 $ 57.14
Convertible Notes | Convertible Notes 2019 and 2024 And Senior Notes 2027
Debt Instrument [Line Items]
Amortization of debt discount, prior to capitalization of interest $ 123,600,000
Coupon interest expense 15,700,000
Convertible Notes | Convertible Notes 2019, 2021 and 2024
Debt Instrument [Line Items]
Amortization of debt discount, prior to capitalization of interest $ 115,400,000 88,500,000
Coupon interest expense $ 13,400,000 $ 11,900,000
Convertible Notes | Convertible Notes 2021 and 2024
Debt Instrument [Line Items]
Equity component of the convertible note issuance, net 2,800,000
Amortization of discount on convertible notes $ 9,800,000 $ 9,800,000
Senior Loans [Member] | Senior Notes Due 2027
Debt Instrument [Line Items]
Remaining period for convertible debt 95 months

Senior Notes and Convertible _4

Senior Notes and Convertible Notes - Components of Notes (Details) - USD ($) Dec. 31, 2019 Dec. 31, 2018
Principal amounts:
Net carrying amount $ 1,816,833,000 $ 1,730,922,000
Convertible Notes | 2021 Notes
Principal amounts:
Debt instrument, principal amount 954,000,000 954,000,000
Unamortized debt discount and issuance costs (84,652,000) (130,232,000)
Net carrying amount 869,348,000 823,768,000
Carrying amount of the equity component 283,283,000 283,283,000
Convertible Notes | 2024 Notes
Principal amounts:
Debt instrument, principal amount 1,150,000,000 1,150,000,000
Unamortized debt discount and issuance costs (202,515,000) (242,846,000)
Net carrying amount 947,485,000 907,154,000
Carrying amount of the equity component 254,981,000 254,981,000
Convertible Notes | Convertible Notes 2019
Principal amounts:
Debt instrument, principal amount 935,000,000
Unamortized debt discount and issuance costs (37,672,000)
Net carrying amount 897,328,000
Carrying amount of the equity component $ 222,826,000
Senior Notes | Senior Notes Due 2027
Principal amounts:
Debt instrument, principal amount 700,000,000
Unamortized debt discount and issuance costs (8,033,000)
Net carrying amount 691,967,000
Carrying amount of the equity component $ 0

Net Income (Loss) Per Share - B

Net Income (Loss) Per Share - Basic and Diluted Net Loss Per Share (Details) - USD ($) $ / shares in Units, shares in Thousands, $ in Thousands 12 Months Ended
Dec. 31, 2019 Dec. 31, 2018 Dec. 31, 2017
Numerator
Net income (loss) $ 1,465,659 $ 1,205,596 $ (108,063)
Denominator
Weighted-average common shares outstanding 772,663 756,916 736,607
Weighted-average restricted stock subject to repurchase (1,934) (2,590) (3,905)
Weighted-average shares used to compute basic net income (loss) per share 770,729 754,326 732,702
Basic (in dollars per share) $ 1.90 $ 1.60 $ (0.15)
Numerator
Net income (loss) $ 1,465,659 $ 1,205,596 $ (108,063)
Denominator
Number of shares used in basic computation 770,729 754,326 732,702
Weighted-average effect of dilutive securities:
RSUs 10,468 13,285 0
Stock options 2,496 2,686 0
Other 1,838 2,389 0
Weighted-average shares used to compute diluted net income (loss) per share 785,531 772,686 732,702
Diluted (in dollars per share) $ 1.87 $ 1.56 $ (0.15)

Net Income (Loss) Per Share - S

Net Income (Loss) Per Share - Summary of Potential Common Shares Excluded from Calculation of Diluted Net Loss Per Share Attributable to Common Stockholders (Details) - shares shares in Thousands 12 Months Ended
Dec. 31, 2019 Dec. 31, 2018 Dec. 31, 2017
RSUs
Earnings Per Share, Basic, by Common Class, Including Two Class Method [Line Items]
Anti-dilutive securities excluded from the computation of diluted net loss per share 12,117 14,949 33,123
Warrants
Earnings Per Share, Basic, by Common Class, Including Two Class Method [Line Items]
Anti-dilutive securities excluded from the computation of diluted net loss per share 42,246 44,454 24,329
Stock options
Earnings Per Share, Basic, by Common Class, Including Two Class Method [Line Items]
Anti-dilutive securities excluded from the computation of diluted net loss per share 3 837 4,793
Shares subject to repurchase and others
Earnings Per Share, Basic, by Common Class, Including Two Class Method [Line Items]
Anti-dilutive securities excluded from the computation of diluted net loss per share 1,284 1,951 5,879

Net Income (Loss) Per Share - A

Net Income (Loss) Per Share - Additional Information (Details) shares in Millions 12 Months Ended
Dec. 31, 2019$ / sharesshares
Convertible Notes 2019 and 2021
Earnings Per Share, Basic, by Common Class, Including Two Class Method [Line Items]
Conversion price (in dollars per share) $ 77.64
Exercise price of the warrants (in dollars per share) 105.28
Convertible Notes 2021
Earnings Per Share, Basic, by Common Class, Including Two Class Method [Line Items]
Conversion price (in dollars per share) $ 77.64
Conversion spread will have a dilutive impact on diluted net income per share of common stock | shares 12.3
2024 Notes
Earnings Per Share, Basic, by Common Class, Including Two Class Method [Line Items]
Conversion price (in dollars per share) $ 57.14
Conversion spread will have a dilutive impact on diluted net income per share of common stock | shares 20.1
Exercise price of the warrants (in dollars per share) $ 80.20

Preferred Stock - Additional In

Preferred Stock - Additional Information (Details) - shares Dec. 31, 2019 Dec. 31, 2018
Features of Convertible Preferred Stock [Abstract]
Preferred stock, shares authorized 200,000,000 200,000,000
Preferred stock, shares outstanding 0 0

Common Stock and Stockholders_3

Common Stock and Stockholders' Equity - Additional Information (Details) - USD ($) Nov. 07, 2013 Dec. 31, 2019 Dec. 31, 2018 Dec. 31, 2017
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]
Common stock, shares authorized 5,000,000,000 5,000,000,000
Common stock, par value $ 0.000005 $ 0.000005
Dividends declared $ 0
Stock options outstanding 3,227,000 3,692,000
Options granted expire years 10 years
Issuance of common stock upon purchases under employee stock purchase plan, shares 1,600,000 1,500,000
Employee stock purchase plan (ESOP), weighted average purchase price of shares purchased $ 26.62 $ 19.03
Shares expected to vest, target level number 1
Gross unamortized stock-based compensation expense related to unvested awards $ 874,700,000
Unrecognized share-based compensation expense, weighted average recognition period 2 years 8 months 12 days
Internal Use Software and Website Development Costs
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]
Share-based compensation, capitalized amount $ 37,500,000 $ 41,400,000 $ 51,800,000
Restricted Common Stock | All Acquisitions
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]
Equity compensation service period 4 years
Employee Stock Options
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]
Stock options exercised, intrinsic value $ 13,100,000 16,900,000 51,600,000
PRSUs
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]
Share-based compensation arrangement by share-based payment award, award vesting period 1 year
Fair value of stock units vested $ 23,200,000
Shares expected to vest, percentage of target level 100.00%
PRSUs | PRSUs
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]
Shares expected to vest, target level number 646,000
Vested and expected to vest, outstanding (in shares) 646,000
TSR RSUs
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]
Share-based compensation arrangement by share-based payment award, award vesting period 2 years
Fair value of stock units vested $ 3,700,000
Shares expected to vest, target level number 381,000
Shares expected to vest, percentage of target level 116.00%
Vested and expected to vest, outstanding (in shares) 328,000
PRSUs and TSR RSUs
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]
Additional number of shares, that will vest based on performance goals and total shareholder return targets 443,311
Restricted Stock Units
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]
Fair value of stock units vested $ 454,500,000 $ 445,700,000 $ 358,700,000
Maximum | PRSUs and TSR RSUs
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]
Shares expected to vest, percentage of target level 200.00%
Minimum | PRSUs and TSR RSUs
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]
Shares expected to vest, percentage of target level 0.00%
2013 Equity Incentive Plan
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]
Number of shares initially reserved 68,300,000
Number of shares available for issuance 60,000,000
Outstanding shares of common stock percentage 5.00%
Stock options, restricted stock units and performance restricted stock units outstanding 34,100,000
Common stock, reserved for future issuance 198,400,000
2007 Equity Incentive Plan
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]
Stock options outstanding 2,200,000
Shares issued during the period 0
2016 Equity Incentive Plan
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]
Number of shares initially reserved 6,800,000
Shares issued during the period 0
2013 Employee Stock Purchase Plan
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]
Number of shares available for issuance 11,300,000
Outstanding shares of common stock percentage 1.00%
Company's common stock at a discount through payroll deductions 15.00%
Lower fair market value of common stock on the first trading day 85.00%

Common Stock and Stockholders_4

Common Stock and Stockholders' Equity - Summary of Restricted Stock Activity (Details) - Restricted Common Stock shares in Thousands 12 Months Ended
Dec. 31, 2019$ / sharesshares
Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Nonvested, Number of Shares [Roll Forward]
Beginning of period (in shares) | shares 2,238
Granted (in shares) | shares 471
Vested (in shares) | shares (1,278)
Canceled (in shares) | shares (3)
End of period (in shares) | shares 1,428
Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Nonvested, Weighted Average Grant Date Fair Value [Abstract]
Beginning of period (in dollars per share) | $ / shares $ 19.50
Granted (in dollars per share) | $ / shares 33.90
Vested (in dollars per share) | $ / shares 19.49
Canceled (in dollars per share) | $ / shares 18.23
End of period (in dollars per share) | $ / shares $ 24.26

Common Stock and Stockholders_5

Common Stock and Stockholders' Equity - Summary of Stock Option Activity (Details) - USD ($) $ / shares in Units, shares in Thousands, $ in Thousands 12 Months Ended
Dec. 31, 2019 Dec. 31, 2018
Options Outstanding - Number of Shares
Outstanding at beginning of period (in shares) 3,692
Options granted and assumed in connection with acquisitions (in shares) 0
Options exercised (in shares) (361)
Options canceled (in shares) (104)
Outstanding at end of period (in shares) 3,227 3,692
Exercisable at end of period (in shares) 3,211
Options Outstanding - Weighted-Average Exercise Price Per Share
Outstanding at beginning of period (dollars par share) $ 8.88
Options granted and assumed in connection with acquisitions (dollars par share) 0
Options exercised (dollars par share) 2.32
Options canceled (dollars par share) 1.75
Outstanding at end of period (dollars par share) 9.84 $ 8.88
Exercisable at end of period (dollars par share) $ 9.98
Options Outstanding - Weighted-Average Remaining Contractual Life
Outstanding (in years) 2 years 7 months 24 days 3 years 7 months 20 days
Exercisable at end of period (in years) 2 years 7 months 17 days
Options Outstanding - Aggregate Intrinsic Value
Outstanding $ 74,630 $ 73,581
Exercisable at end of period $ 74,250

Common Stock and Stockholders_6

Common Stock and Stockholders' Equity - Summary of PRSUs Activity (Details) - PRSUs - $ / shares 12 Months Ended
Dec. 31, 2019 Dec. 31, 2018
Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Nonvested, Number of Shares [Roll Forward]
Beginning of period (in shares) 390,000
Granted (100% target level) (in shares) 646,000
Additional earned performance shares related to 2018 grants (in shares) 362,000
Vested (in shares) (752,000)
End of period (in shares) 646,000 390,000
Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Nonvested, Weighted Average Grant Date Fair Value [Abstract]
Beginning of period (in dollars per share) $ 35.55
Granted (100% target level) (in dollars per share) 31.52
Additional earned performance shares related to 2018 grants (in dollars per share) 35.55
Vested (in dollars per share) 35.55
End of period (in dollars per share) $ 31.52 $ 35.55
Shares granted, percentage of target level 100.00%
Shares vested, percentage of target level 193.00%

Common Stock and Stockholders_7

Common Stock and Stockholders' Equity - Summary of TSR RSUs Activity (Details) - TSR RSUs - $ / shares shares in Thousands 12 Months Ended
Dec. 31, 2019 Dec. 31, 2018
Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Nonvested, Number of Shares [Roll Forward]
Beginning of period (in shares) 420
Granted (100% target level) (in shares) 431
Additional earned performance shares related to 2018 grants (in shares) 30
Vested (in shares) (122)
End of period (in shares) 759 420
Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Nonvested, Weighted Average Grant Date Fair Value [Abstract]
Beginning of period (in dollars per share) $ 45.78
Granted (100% target level) (in dollars per share) 30.60
Additional earned performance shares related to 2018 grants (in dollars per share) 13.02
Vested (in dollars per share) 13.02
End of period (in dollars per share) $ 41.15 $ 45.78
Shares granted, percentage of target level 100.00%
Shares vested, percentage of target level 132.00%

Common Stock and Stockholders_8

Common Stock and Stockholders' Equity - Summary of RSU Activity (Details) - RSUs shares in Thousands 12 Months Ended
Dec. 31, 2019$ / sharesshares
Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Nonvested, Number of Shares [Roll Forward]
Beginning of period (in shares) | shares 30,387
Granted (in shares) | shares 17,291
Vested (in shares) | shares (12,646)
Canceled (in shares) | shares (3,301)
End of period (in shares) | shares 31,731
Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Nonvested, Weighted Average Grant Date Fair Value [Abstract]
Beginning of period (in dollars per share) | $ / shares $ 24.97
Granted (in dollars per share) | $ / shares 33.73
Vested (in dollars per share) | $ / shares 24.74
Canceled (in dollars per share) | $ / shares 25.89
End of period (in dollars per share) | $ / shares $ 29.74

Common Stock and Stockholders_9

Common Stock and Stockholders' Equity - Compensation Expense Allocated (Details) - USD ($) $ in Thousands 12 Months Ended
Dec. 31, 2019 Dec. 31, 2018 Dec. 31, 2017
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]
Stock-based compensation expense $ 378,025 $ 326,228 $ 433,806
Cost of revenue
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]
Stock-based compensation expense 22,797 17,289 23,849
Research and development
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]
Stock-based compensation expense 209,063 183,799 240,833
Sales and marketing
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]
Stock-based compensation expense 85,739 71,305 94,135
General and administrative
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]
Stock-based compensation expense $ 60,426 $ 53,835 $ 74,989

Income Taxes - Summary of Domes

Income Taxes - Summary of Domestic and Foreign Components of Income (Loss) Before Income Taxes (Details) - USD ($) $ in Thousands 12 Months Ended
Dec. 31, 2019 Dec. 31, 2018 Dec. 31, 2017
Income Tax Disclosure [Abstract]
Domestic $ 317,135 $ 193,500 $ (18,412)
Foreign 73,004 230,044 (77,006)
Income (loss) before income taxes $ 390,139 $ 423,544 $ (95,418)

Income Taxes - Components of Pr

Income Taxes - Components of Provision (Benefit) for Income Taxes (Details) - USD ($) $ in Thousands 12 Months Ended
Dec. 31, 2019 Dec. 31, 2018 Dec. 31, 2017
Current:
Federal $ 563 $ (1,661) $ 1,977
State 3,375 4,083 316
Foreign 43,053 17,246 16,767
Total current provision for income taxes 46,991 19,668 19,060
Deferred:
Federal 2,023 (711,084) (4,701)
State 2,050 (49,047) (67)
Foreign (1,126,584) (41,589) (1,647)
Total deferred benefit for income taxes (1,122,511) (801,720) (6,415)
Provision (benefit) for income taxes $ (1,075,520) $ (782,052) $ 12,645

Income Taxes - Schedule of Reco

Income Taxes - Schedule of Reconciliation of Statutory Federal Income Tax Rate to Effective Tax Rate (Details) 12 Months Ended
Dec. 31, 2019 Dec. 31, 2018 Dec. 31, 2017
Effective Income Tax Rate Reconciliation, Percent [Abstract]
Tax at federal statutory rate 21.00% 21.00% 35.00%
State taxes, net of federal benefit 1.10% (8.40%) (0.30%)
Stock-based compensation (4.90%) (6.40%) (28.50%)
Research and development credits (8.50%) (5.60%) 18.60%
Valuation allowance (0.20%) (179.10%) 425.20%
Effect of the U.S. Tax Act 0.00% 0.00% (369.80%)
Nondeductible other expenses 3.10% 0.20% (8.70%)
Deferred tax asset on intra-entity transfer of intangible assets (308.40%) 0.00% 0.00%
Foreign rate differential 20.30% (6.40%) (81.20%)
Other 0.80% 0.10% (3.60%)
Effective tax rate (275.70%) (184.60%) (13.30%)

Income Taxes - Schedule of Tax

Income Taxes - Schedule of Tax Effects of Temporary Differences and Related Deferred Tax Assets and Liabilities (Details) - USD ($) $ in Thousands Dec. 31, 2019 Dec. 31, 2018
Deferred tax assets:
Net operating loss carryforwards $ 390,005 $ 513,427
Accruals and reserves 37,172 32,298
Stock-based compensation expense 32,573 29,600
Tax credits 425,011 375,699
Capitalized research expenditures 1,679 13,868
Fixed assets and intangible assets 1,214,070 24,819
Investments 15,560 16,571
Operating lease liability 170,817 0
Other 3,131 17,658
Total deferred tax assets 2,290,018 1,023,940
Valuation allowance (223,775) (210,862)
Total deferred tax assets, net of valuation allowance 2,066,243 813,078
Deferred tax liabilities:
Operating lease right-of-use asset (157,845) 0
Other (1,138) (4,619)
Total deferred tax liabilities (158,983) (4,619)
Net deferred tax assets $ 1,907,260 $ 808,459

Income Taxes - Additional Infor

Income Taxes - Additional Information (Details) - USD ($) $ in Thousands 12 Months Ended
Dec. 31, 2019 Dec. 31, 2018 Dec. 31, 2017 Dec. 31, 2016
Income Tax [Line Items]
Deferred tax assets establishment related to intra-entity transfers of intangible assets $ 1,206,880 $ 0 $ 0
Release of valuation allowance 0 (845,129) $ 0
Tax provision recorded from case settlement 80,000
Deferred tax asset valuation allowance $ 223,775 $ 210,862
Federal corporate income tax rate 21.00% 21.00% 35.00%
Unrecognized tax benefits $ 419,858 $ 332,314 $ 259,781 $ 269,508
Unrecognized tax benefits, if recognized would not affect the annual effective tax rate 348,200
Unrecognized tax benefits, if recognized would affect the annual effective tax rate 348,200
Interest and penalties related to uncertain tax positions 5,300 3,100
California Enterprise Zone
Income Tax [Line Items]
Credit carryforwards amount $ 19,100
Credit carryforward, expiration year 2023
Federal
Income Tax [Line Items]
Deferred tax asset valuation allowance $ 13,900 14,600
Net operating loss carryforwards $ 2,340,000
Operating loss carryforwards, expiration year 2034
Credit carryforward, expiration start year 2027
Federal | Research
Income Tax [Line Items]
Credit carryforwards amount $ 345,200
State
Income Tax [Line Items]
Deferred tax asset valuation allowance 209,900 196,300
Net operating loss carryforwards $ 1,260,000
Operating loss carryforwards, expiration year 2024
State | Research
Income Tax [Line Items]
Credit carryforwards amount $ 264,800
Brazilian Operations
Income Tax [Line Items]
Release of valuation allowance $ 845,100

Income Taxes - Schedule of Re_2

Income Taxes - Schedule of Reconciliation of Beginning and Ending Amount of Unrecognized Tax Benefit (Details) - USD ($) $ in Thousands 12 Months Ended
Dec. 31, 2019 Dec. 31, 2018 Dec. 31, 2017
Reconciliation of Unrecognized Tax Benefits, Excluding Amounts Pertaining to Examined Tax Returns [Roll Forward]
Gross unrecognized tax benefits at the beginning of the year $ 332,314 $ 259,781 $ 269,508
Increases related to prior year tax positions 54,743 20,000 913
Decreases related to prior year tax positions (2,537) (13,174) 0
Decreases related to settlement with tax authorities 0 0 (1,415)
Decreases related to the Tax Act 0 0 (71,104)
Increases related to current year tax positions 35,338 66,249 61,879
Statute of limitations expirations 0 (542) 0
Gross unrecognized tax benefits at the end of the year $ 419,858 $ 332,314 $ 259,781

Income Taxes - Summary of Unrec

Income Taxes - Summary of Unrecognized Tax Benefits Recorded in Balance Sheet (Details) - USD ($) $ in Thousands Dec. 31, 2019 Dec. 31, 2018 Dec. 31, 2017 Dec. 31, 2016
Income Tax Uncertainties [Abstract]
Total unrecognized tax benefits balance $ 419,858 $ 332,314 $ 259,781 $ 269,508
Amounts netted against related deferred tax assets (401,818) (317,524)
Unrecognized tax benefits recorded on consolidated balance sheets $ 18,040 $ 14,790

Commitments and Contingencies -

Commitments and Contingencies - Additional Information (Details) - Revolving Credit Facility - USD ($) Dec. 31, 2019 Aug. 31, 2018
Other Commitments [Line Items]
Unsecured revolving credit facility $ 500,000,000
Line of credit facility amount $ 0

Commitments and Contingencies_2

Commitments and Contingencies - Summary of Commitments to Settle Contractual Obligations in Cash (Details) - USD ($) $ in Thousands 12 Months Ended
Dec. 31, 2019 Dec. 31, 2018
Other Commitments [Line Items]
Total $ 4,685,838
Payments Due by Next Year 369,618
Payments Due by Year 1-3 years 1,569,845
Payments Due by Year 3-5 years 1,534,851
Payments Due by Year More than 5 years $ 1,211,524
Sublease income term 3 years
Sublease income $ 21,793 $ 52,537
2021 Notes
Other Commitments [Line Items]
Total 973,106
Payments Due by Next Year 9,566
Payments Due by Year 1-3 years 963,540
Payments Due by Year 3-5 years 0
Payments Due by Year More than 5 years 0
2024 Notes
Other Commitments [Line Items]
Total 1,162,914
Payments Due by Next Year 2,875
Payments Due by Year 1-3 years 5,734
Payments Due by Year 3-5 years 1,154,305
Payments Due by Year More than 5 years 0
2027 Notes
Other Commitments [Line Items]
Total 917,446
Payments Due by Next Year 27,626
Payments Due by Year 1-3 years 54,213
Payments Due by Year 3-5 years 54,287
Payments Due by Year More than 5 years 781,320
Operating Lease Obligations
Other Commitments [Line Items]
Total 1,149,558
Payments Due by Next Year 180,183
Payments Due by Year 1-3 years 321,700
Payments Due by Year 3-5 years 226,662
Payments Due by Year More than 5 years 421,013
Finance Lease Obligations
Other Commitments [Line Items]
Total 24,414
Payments Due by Next Year 23,845
Payments Due by Year 1-3 years 569
Payments Due by Year 3-5 years 0
Payments Due by Year More than 5 years 0
Other Contractual Commitments
Other Commitments [Line Items]
Total 458,400
Payments Due by Next Year 125,523
Payments Due by Year 1-3 years 224,089
Payments Due by Year 3-5 years 99,597
Payments Due by Year More than 5 years $ 9,191

Related Party Transactions - Ad

Related Party Transactions - Additional Information (Details) - USD ($) $ in Millions 12 Months Ended
Dec. 31, 2019 Dec. 31, 2018 Dec. 31, 2017
Related Party Transactions [Abstract]
Revenue receivable under contractual obligations from customers $ 4.2 $ 3.8
Revenue recognized under contractual obligations from customers $ 22 $ 25.9 $ 22.5

Employee Benefit Plan - Additio

Employee Benefit Plan - Additional Information (Details) - USD ($) $ in Millions 12 Months Ended
Dec. 31, 2019 Dec. 31, 2018 Dec. 31, 2017
Defined Benefit Plan [Abstract]
Employer discretionary contribution amount $ 8.8 $ 6.3 $ 2.8

Segment Information and Opera_3

Segment Information and Operations by Geographic Area - Property and Equipment Net by Geographic Area (Details) - USD ($) $ in Thousands Dec. 31, 2019 Dec. 31, 2018
Property and equipment, net:
Property and equipment, net $ 1,031,781 $ 885,078
United States
Property and equipment, net:
Property and equipment, net 999,552 853,731
International
Property and equipment, net:
Property and equipment, net $ 32,229 $ 31,347

Schedule II - Valuation and Q_2

Schedule II - Valuation and Qualifying Accounts (Details) - USD ($) $ in Thousands 12 Months Ended
Dec. 31, 2019 Dec. 31, 2018 Dec. 31, 2017
Allowance for Deferred Tax Assets
SEC Schedule, 12-09, Valuation and Qualifying Accounts Disclosure [Line Items]
Balance at Beginning of Year $ 210,862 $ 1,021,326 $ 439,993
Charged to Expenses 12,913 (817,529) (346,389)
Charged/Credited to Other Accounts 0 7,065 927,722
Balance at End of Year 223,775 210,862 1,021,326
Allowance for Doubtful Accounts
SEC Schedule, 12-09, Valuation and Qualifying Accounts Disclosure [Line Items]
Balance at Beginning of Year 3,559 5,430 7,216
Additions (Reductions) 3,083 1,610 586
Write-off/ Adjustments (4,241) (3,481) (2,372)
Balance at End of Year $ 2,401 $ 3,559 $ 5,430

Uncategorized Items - twtr-2019

Label Element Value
Restricted Cash and Cash Equivalents, Current us-gaap_RestrictedCashAndCashEquivalentsAtCarryingValue $ 1,698,000
Restricted Cash and Cash Equivalents, Current us-gaap_RestrictedCashAndCashEquivalentsAtCarryingValue 1,862,000
Restricted Cash and Cash Equivalents, Current us-gaap_RestrictedCashAndCashEquivalentsAtCarryingValue 8,289,000
Restricted Cash and Cash Equivalents, Noncurrent us-gaap_RestrictedCashAndCashEquivalentsNoncurrent 26,722,000
Restricted Cash and Cash Equivalents, Noncurrent us-gaap_RestrictedCashAndCashEquivalentsNoncurrent 27,155,000
Restricted Cash and Cash Equivalents, Noncurrent us-gaap_RestrictedCashAndCashEquivalentsNoncurrent 25,733,000
Additional Paid-in Capital [Member]
Cumulative Effect of New Accounting Principle in Period of Adoption us-gaap_CumulativeEffectOfNewAccountingPrincipleInPeriodOfAdoption 13,316,000
Retained Earnings [Member]
Cumulative Effect of New Accounting Principle in Period of Adoption us-gaap_CumulativeEffectOfNewAccountingPrincipleInPeriodOfAdoption $ (13,316,000)