Summary of Significant Accounting Policies | Note 2 – Summary of Significant Accounting Policies Unaudited Interim Financial Statements The consolidated balance sheet as of June 30, 2019, the consolidated statements of operations, the consolidated statements of comprehensive loss and the consolidated statements of redeemable noncontrolling interests and equity for the three and six months ended June 30, 2019 and 2018 and the consolidated statements of cash flows for the six months ended June 30, 2019 and 2018, as well as other information disclosed in the accompanying notes, are unaudited. The consolidated balance sheet as of December 31, 2018 was derived from the audited consolidated financial statements as of that date. The interim consolidated financial statements and the accompanying notes should be read in conjunction with the annual consolidated financial statements and the accompanying notes contained in our Annual Report on Form 10-K for the year ended December 31, 2018. The interim consolidated financial statements and the accompanying notes have been prepared on the same basis as the annual consolidated financial statements and, in the opinion of management, reflect all adjustments, which include only normal recurring adjustments, necessary for a fair statement of the results of operations for the periods presented. The consolidated results of operations for any interim period are not necessarily indicative of the results to be expected for the full year or for any other future years or interim periods. Revenue Recognition Automotive Sales Revenue Automotive Sales with and without Resale Value Guarantee Automotive sales revenue includes revenues related to deliveries of new vehicles, and specific other features and services that meet the definition of a performance obligation include access to our Supercharger network, internet connectivity, Autopilot and Full Self-Driving (“FSD”) features and over-the-air software updates. Deferred revenue related to the access to our Supercharger network, internet connectivity, Autopilot and FSD features and over-the-air software updates on automotive sales with and without resale value guarantee amounted to $1.19 billion and $882.8 million as of June 30, 2019 and December 31, 2018, respectively. Deferred revenue is equivalent to the total transaction price allocated to the performance obligations that are unsatisfied, or partially unsatisfied, as of the balance sheet date. Revenue recognized from the deferred revenue balance as of December 31, 2018 was $113.5 million for the six months ended June 30, 2019 . Of the total deferred revenue on automotive sales with and without resale value guarantees, we expect to recognize $567.0 million of revenue in the next 12 months. The remaining balance will be recognized over the various performance periods of the obligations, which is up to the eight-year life of the vehicle. At the time of revenue recognition, we reduce the transaction price and record a sales return reserve against revenue for estimated variable consideration related to future product returns. Such estimates are based on historical experience. On a quarterly basis, we assess the estimated market values of vehicles under our buyback options program to determine whether there will be changes to future product returns. As we accumulate more data related to the buyback values of our vehicles or as market conditions change, there may be material changes to their estimated values. $64.1 $564.6 Automotive Regulatory Credits We recognize revenue on the sale of regulatory credits at the time control of the regulatory credits is transferred to the purchasing party as automotive revenue in the consolidated statements of operations. Deferred revenue related to sales of automotive regulatory credits was $140.0 million and $0 as of June 30, 2019 Automotive Leasing Revenue Automotive leasing revenue includes revenue recognized under lease accounting guidance for our direct leasing programs as well as the two programs with resale value guarantees described below. Direct Vehicle Leasing Program We have outstanding leases under our direct vehicle leasing programs in the U.S., Canada and in certain countries in Europe. As of June 30, 2019, the direct vehicle leasing program is offered for new Model S, Model X vehicles in the U.S. and Canada and for new Model 3 vehicles in the U.S. Qualifying customers are permitted to lease a vehicle directly from Tesla for up to 48 months. At the end of the lease term, customers have the option of either returning the vehicle to us or purchasing it for a pre-determined residual value, for Model S and Model X leases. We account for these leasing transactions as operating leases. We record leasing revenues to automotive leasing revenue on a straight-line basis over the contractual term, and we record the depreciation of these vehicles to cost of automotive leasing revenue. We capitalize shipping costs and initial direct costs such as the incremental cost of contract administration, referral fees and sales commissions from the origination of automotive lease agreements as an element of operating lease vehicles, net, and subsequently amortize these costs over the term of the related lease agreement. Our policy is to exclude taxes collected from a customer from the transaction price of automotive contracts. Vehicle Sales to Leasing Partners with a Resale Value Guarantee and a Buyback Option We offer buyback options in connection with automotive sales with resale value guarantees with certain leasing partner sales in the United States. These transactions entail a transfer of leases, which we have originated with an end-customer, to our leasing partner. As control of the vehicles has not been transferred, these transactions were accounted for as interest bearing collateralized borrowings in accordance with ASC 840, Leases At the end of the lease term, we settle our liability in cash by either purchasing the vehicle from the leasing partner for the buyback option amount or paying a shortfall to the option amount the leasing partner may realize on the sale of the vehicle. Any remaining balances within deferred revenue and resale value guarantee will be settled to automotive leasing revenue. The end customers can extend the lease for a period of up to 6 months. . The maximum amount we could be required to pay under this program, should we decide to repurchase all vehicles, was $355.7 million and $479.8 million as of June 30, 2019 and , respectively, including $297.2 million within a 12-month period from June 30, 2019. As of June 30, 2019 and we had $399.8 and $558.3 million, respectively, of such borrowings recorded in resale value guarantees and $68.7 million and $92.5 million, respectively, recorded in deferred revenue liability. $84.7 million and $167.2 million, respectively, for the same periods in 2018 Vehicle S ales to Customers with a Resale Value Guarantee where Exercise is Probable For certain international programs where we have offered resale value guarantees to certain customers who purchased vehicles and where we expect the customer has a significant economic incentive to exercise the resale value guarantee provided to them, we continue to recognize these transactions as operating leases. The process to determine whether there is a significant economic incentive includes a comparison of a vehicle’s estimated market value at the time the option is exercisable with the guaranteed resale value to determine the customer’s economic incentive to exercise. We have not sold any vehicles under this program since the first half of 2017 and all current period activity relates to the exercise or cancellation of active transactions. The amount of sale proceeds equal to the resale value guarantee is deferred until the guarantee expires or is exercised. The remaining sale proceeds are deferred and recognized on a straight-line basis over the stated guarantee period to automotive leasing revenue. The guarantee period expires at the earlier of the end of the guarantee period or the pay-off of the initial loan. We capitalize the cost of these vehicles on the consolidated balance sheets as operating lease vehicles, net, and depreciate their value, less salvage value, to cost of automotive leasing revenue over the same period. In cases where a customer retains ownership of a vehicle at the end of the guarantee period, the resale value guarantee liability and any remaining deferred revenue balances related to the vehicle are settled to automotive leasing revenue, and the net book value of the leased vehicle is expensed to cost of automotive leasing revenue. If a customer returns the vehicle to us during the guarantee period, we purchase the vehicle from the customer in an amount equal to the resale value guarantee and settle any remaining deferred balances to automotive leasing revenue, and we reclassify the net book value of the vehicle on the consolidated balance sheets to used vehicle inventory. As of June 30, 2019 and December 31, 2018, $187.5 million and $149.7 million, respectively, of the guarantees were exercisable by customers within the next 12 months. For the three and six months ended June 30, 2019, we recognized $37.3 million and $84.8 million, respectively, of leasing revenue related to this program, and $60.6 million and $76.7 million, respectively, for the same periods in 2018. The net carrying amount of operating lease vehicles under this program was $142.1 million and $211.5 million, respectively, as of June 30, 2019 and December 31, 2018. Services and Other Revenue Services and other revenue consists of non-warranty after-sales vehicle services, sales of used vehicles, retail merchandise, and sales by our acquired subsidiaries to third party customers. Revenues related to repair and maintenance services are recognized over time as services are provided and extended service plans are recognized over the performance period of the service contract as the obligation represents a stand-ready obligation to the customer. We sell used vehicles, services, service plans, vehicle components and merchandise separately and thus use standalone selling prices as the basis for revenue allocation to the extent that these items are sold in transactions with other performance obligations. Payment for used vehicles, services, and merchandise are typically received at the point when control transfers to the customer or in accordance with payment terms customary to the business. Payments received for prepaid plans are refundable upon customer cancellation of the related contracts and are included within customer deposits on the consolidated balance sheet. Deferred revenue related to services and other revenue was immaterial as of June 30, 2019 and December 31, 2018. Energy Generation and Storage Sales Energy generation and storage sales revenues consists of the sale of solar energy systems and energy storage systems to residential, small commercial, and large commercial and utility grade customers. Upon adoption of the new lease standard (refer to Leases Revenue recognized from the deferred revenue balance as of January 1, 2018, was $28.6 million for the six months ended June 30, 2018. Deferred revenue also includes the portion of rebates and incentives received from utility companies and various local and state government agencies, which is recognized as revenue over the lease term. As of June 30, 2019 35.3 We capitalize initial direct costs from the execution of solar energy system sales and PPAs, which include the referral fees and sales commissions, as an element of solar energy systems, net, and subsequently amortize these costs over the term of the related sale or PPA. Revenue by source The following table disaggregates our revenue by major source (in thousands): Three Months Ended June 30, Six Months Ended June 30, 2019 2018 2019 2018 Automotive sales without resale value guarantee $ 4,918,301 $ 2,698,239 $ 8,601,682 $ 4,880,753 Automotive sales with resale value guarantee (1) 138,507 365,616 (252,114 ) 664,654 Automotive regulatory credits 111,219 54,010 327,200 134,339 Energy generation and storage sales (2) 225,765 234,602 437,865 532,497 Services and other 605,079 270,142 1,098,021 533,554 Total revenues from sales and services 5,998,871 3,622,609 10,212,654 6,745,797 Automotive leasing 208,362 239,816 423,482 413,252 Energy generation and storage leasing (2) 142,443 139,806 255,004 251,933 Total revenues $ 6,349,676 $ 4,002,231 $ 10,891,140 $ 7,410,982 (1) We made pricing adjustments to our vehicle offerings during the six months ended June 30, 2019, which resulted in a reduction of automotive sales with resale value guarantee revenues. Refer to Automotive Sales with and without Resale Value Guarantee (2) Following the adoption of ASU No. 2016-02, Leases Leases Leases In February 2016, the FASB issued ASU No. 2016-02 (“ASC 842”), Leases, to require lessees to recognize all leases, with certain exceptions, on the balance sheet, while recognition on the statement of operations will remain similar to current lease accounting. Subsequently, the FASB issued ASU No. 2018-10, Codification Improvements to Topic 842, Leases, ASU No. 2018-11, Targeted Improvements, ASU No. 2018-20, Narrow-Scope Improvements for Lessors, and ASU 2019-01, Codification Improvements, to clarify and amend the guidance in ASU No. 2016-02. ASC 842 eliminates real estate-specific provisions and modifies certain aspects of lessor accounting. This standard is effective for interim and annual periods beginning after December 15, 2018, with early adoption permitted. We adopted ASC 842 as of January 1, 2019 using the cumulative effect adjustment approach (“adoption of the new lease standard”). In addition, we elected the package of practical expedients permitted under the transition guidance within the new standard, which allowed us to carry forward the historical determination of contracts as leases, lease classification and not reassess initial direct costs for historical lease arrangements. Accordingly, previously reported financial statements, including footnote disclosures, have not been recast to reflect the application of the new standard to all comparative periods presented. The finance lease classification under ASC 842 includes leases previously classified as capital leases under ASC 840. Agreements for solar energy system leases and PPAs (solar leases) that commence after January 1, 2019, where we are the lessor and would have been accounted for as operating leases no longer meet the definition of a lease upon the adoption of ASC 842 and will instead be accounted for in accordance with ASC 606. Under these two types of arrangements, the customer is not responsible for the design of the energy system but rather approved the energy system benefits in terms of energy capacity and production to be received over the term. Accordingly, the revenue from solar leases commencing after January 1, 2019 are now recognized as earned, based on the amount of capacity provided or electricity delivered at the contractual billing rates, assuming all other revenue recognition criteria have been met. Under the practical expedient available under ASC 606-10-55-18, we recognize revenue based on the value of the service which is consistent with the billing amount. There is no change to the amount and timing of revenue recognition for solar lease arrangements. We have lease agreements with lease and non-lease components, and have elected to utilize the practical expedient to account for lease and non-lease components together as a single combined lease component, from both a lessee and lessor perspective. From a lessor perspective, the timing and pattern of transfer are the same for the non-lease components and associated lease component and, the lease component, if accounted for separately, would be classified as an operating lease. Additionally, we have determined that the leases previously identified as build-to-suit leasing arrangements under legacy lease accounting (ASC 840), were derecognized pursuant to the transition guidance provided for build-to-suit leases in ASC 842. Accordingly, these leases have been reassessed as operating leases as of the adoption date under ASC 842, and are included on the consolidated balance sheet as of June 30, 2019 . Operating lease assets are included within operating lease right-of-use assets, and the corresponding operating lease liabilities are included within accrued liabilities and other ong-term debt and finance leases, net of current portion We have elected not to present short-term leases on the consolidated balance sheet as these leases have a lease term of 12 months or less at lease inception and do not contain purchase options or renewal terms that we are reasonably certain to exercise. All other lease assets and lease liabilities are recognized based on the present value of lease payments over the lease term at commencement date. Because most of our leases do not provide an implicit rate of return, we used our incremental borrowing rate based on the information available at adoption date in determining the present value of lease payments. Adoption of the new lease standard on January 1, 2019 had a material impact on our interim unaudited consolidated financial statements. The most significant impacts related to the (i) recognition of right-of-use ("ROU") assets of $1.29 billion and lease liabilities of $1.24 billion for operating leases on the consolidated balance sheet, and (ii) de-recognition of build-to-suit lease assets and liabilities of $1.62 billion and $1.74 billion, respectively, with the net impact of $96.7 million recorded to accumulated deficit, as of January 1, 2019. We also reclassified prepaid expenses and other current asset balances of $141.6 million and deferred rent balance, including tenant improvement allowances, and other liability balances of $69.7 million relating to our existing lease arrangements as of December 31, 2018, into the ROU asset balance as of January 1, 2019. ROU assets represent our right to use an underlying asset for the lease term and lease liabilities represent our obligation to make lease payments arising from the lease. The standard did not materially impact our consolidated statement of operations and consolidated statement of cash flows. The cumulative effect of the changes made to our consolidated balance sheet as of January 1, 2019 for the adoption of the new lease standard was as Balances at December 31, 2018 Adjustments from Adoption of New Lease Standard Balances at January 1, 2019 Assets Prepaid expenses and other current assets $ 365,671 $ (300 ) $ 365,371 Property, plant and equipment, net 11,330,077 (1,617,373 ) 9,712,704 Operating lease right-of-use assets — 1,285,617 1,285,617 Other assets 571,657 (141,322 ) 430,335 Liabilities Accrued liabilities and other 2,094,253 117,717 2,211,970 Current portion of long-term debt and finance leases 2,567,699 — 2,567,699 Long-term debt and finance leases, net of current portion 9,403,672 — 9,403,672 Other long-term liabilities 2,710,403 (687,757 ) 2,022,646 Equity Accumulated deficit (5,317,832 ) 96,662 (5,221,170 ) Income Taxes There are transactions that occur during the ordinary course of business for which the ultimate tax determination is uncertain. As of June 30, 2019 and December 31, 2018, the aggregate balances of our gross unrecognized tax benefits were $299.1 million and $253.4 million, respectively, of which $278.2 million and $243.8 million, respectively, would not give rise to changes in our effective tax rate since these tax benefits would increase a deferred tax asset that is currently fully offset by a valuation allowance. On June 7, 2019, the Ninth Circuit Court of Appeals issued a new opinion in Altera Corp. v. Commissioner requiring related parties in an intercompany cost-sharing arrangement to share expenses related to share-based compensation. This opinion reversed the prior decision of the United States Tax Court. We do not expect this to have an impact on our consolidated financial statements. Net Income (Loss) per Share of Common Stock Attributable to Common Stockholders Basic net income (loss) per share of common stock attributable to common stockholders is calculated by dividing net income (loss) attributable to common stockholders by the weighted-average shares of common stock outstanding for the period. During the six months ended June 30, 2019, we increased net loss attributable to common stockholders by $7.6 million to arrive at the numerator used to calculate net loss per share. This adjustment represents the difference between the cash we paid to a financing fund investor for their noncontrolling interest in one of our subsidiaries and the carrying amount of the noncontrolling interest on our consolidated balance sheet, in accordance with ASC 260, Earnings per Share Long-Term Debt Obligations The following table presents the potentially dilutive shares that were excluded from the computation of diluted net loss per share of common stock attributable to common stockholders, because their effect was anti-dilutive: Three Months Ended June 30, Six Months Ended June 30, 2019 2018 2019 2018 Stock-based awards 12,820,081 9,925,584 11,829,378 9,815,543 Convertible senior notes 1,088,699 1,500,618 1,088,699 1,503,118 Warrants — 270,027 — 286,010 Restricted Cash We maintain certain cash balances restricted as to withdrawal or use. Our restricted cash is comprised primarily of cash as collateral for our sales to lease partners with a resale value guarantee, letters of credit, real estate leases, insurance policies, credit card borrowing facilities and certain operating leases. In addition, restricted cash includes cash received from certain fund investors that have not been released for use by us and cash held to service certain payments under various secured debt facilities. The following table totals cash and cash equivalents and restricted cash as reported on the consolidated balance sheets; the sums are presented on the consolidated statements of cash flows (in thousands): June 30, December 31, June 30, December 31, 2019 2018 2018 2017 Cash and cash equivalents $ 4,954,740 $ 3,685,618 $ 2,236,424 $ 3,367,914 Restricted cash 128,006 192,551 146,822 155,323 Restricted cash, net of current portion 365,547 398,219 399,992 441,722 Total as presented in the consolidated statements of cash flows $ 5,448,293 $ 4,276,388 $ 2,783,238 $ 3,964,959 Concentration of Risk Credit Risk Financial instruments that potentially subject us to a concentration of credit risk consist of cash, cash equivalents, restricted cash, accounts receivable, convertible note hedges, and interest rate swaps. Our cash balances are primarily invested in money market funds or on deposit at high credit quality financial institutions in the U.S. These deposits are typically in excess of insured limits. As of June 30, 2019 , one entity represented 10% or more of our total accounts receivable balance. As of December 31, 2018, no entity represented 10% of our total accounts receivable balance. The risk of concentration for our interest rate swaps is mitigated by transacting with several highly-rated multinational banks. Supply Risk We are dependent on our suppliers, the majority of which are single source suppliers, and the inability of these suppliers to deliver necessary components of our products in a timely manner at prices, quality levels and volumes acceptable to us, or our inability to efficiently manage these components from these suppliers, could have a material adverse effect on our business, prospects, financial condition and operating results. Operating Lease Vehicles Vehicles that are leased as part of our direct vehicle leasing program, vehicles delivered to leasing partners with a resale value guarantee and a buyback option, as well as vehicles delivered to customers with resale value guarantee where exercise is probable are classified as operating lease vehicles as the related revenue transactions are treated as operating leases (refer to the Resale Value Guarantees Financing Programs under ASC 842 section above for details). Operating lease vehicles are recorded at cost less accumulated depreciation. Depreciation is computed using the straight-line method over the expected operating lease term. The total cost of operating lease vehicles recorded on the consolidated balance sheets as of and was $2.51 billion and $2.55 billion, respectively. Accumulated depreciation related to leased vehicles as of and was $435.9 million and $457.6 million, respectively. Warranties We provide a manufacturer’s warranty on all new and used vehicles, production powertrain components and systems and energy storage products we sell. In addition, we also provide a warranty on the installation and components of the solar energy systems we sell for periods typically between 10 to 30 years. We accrue a warranty reserve for the products sold by us, which includes our best estimate of the projected costs to repair or replace items under warranties and recalls when identified. These estimates are based on actual claims incurred to date and an estimate of the nature, frequency and costs of future claims. These estimates are inherently uncertain given our relatively short history of sales, and changes to our historical or projected warranty experience may cause material changes to the warranty reserve in the future. The warranty reserve does not include projected warranty costs associated with our vehicles subject to lease accounting and our solar energy systems under lease contracts or PPAs, as the costs to repair these warranty claims are expensed as incurred. The portion of the warranty reserve expected to be incurred within the next 12 months is included within accrued liabilities and other while the remaining balance is included within other long-term liabilities on the consolidated balance sheets. Warranty expense is recorded as a component of cost of revenues in the consolidated statements of operations. Accrued warranty activity consisted of the following (in thousands): Three Months Ended June 30, Six Months Ended June 30, 2019 2018 2019 2018 Accrued warranty—beginning of period $ 843,908 $ 465,866 $ 747,826 $ 401,790 Warranty costs incurred (61,237 ) (49,604 ) (115,426 ) (94,285 ) Net changes in liability for pre-existing warranties, including expirations and foreign exchange impact 5,598 (10,917 ) 43,348 (10,416 ) Additional warranty accrued from adoption of the new revenue standard — — — 37,139 Provision for warranty 153,223 118,664 265,744 189,781 Accrued warranty—end of period $ 941,492 $ 524,009 $ 941,492 $ 524,009 For the three and six months ended June 30, 2019, warranty costs incurred for vehicles accounted for as operating leases or collateralized debt arrangements were $5.7 million and $11.3 million, respectively, and for the three and six months ended June 30, 2018, such costs were $7.0 million and $12.8 million, respectively. Recent Accounting Pronouncements Recently issued accounting pronouncements not yet adopted In June 2016, the FASB issued ASU No. 2016-13, Measurement of Credit Losses on Financial Instruments Codification Improvements to Topic 326 In January 2017, the FASB issued ASU No. 2017-04, Simplifying the Test for Goodwill Impairment In August 2018, the FASB issued ASU No. 2018-15, Customer’s Accounting for Implementation Costs Incurred in a Cloud Computing Arrangement that Is a Service Contract . The ASU aligns the requirements for capitalizing implementation costs incurred in a hosting arrangement that is a service contract with the requirements for capitalizing implementation costs incurred to develop or obtain internal-use software (and hosting arrangements that include an internal-use software license). The ASU is effective for interim and annual periods beginning after December 15, 2019, with early adoption permitted. Adoption of the ASU is either retrospective or prospective. We plan to adopt the ASU prospectively on January 1, 2020. The ASU is currently not expected to have a material impact on our consolidated financial statements. Recently adopted accounting pronouncements In February 2016, the FASB issued ASU No. 2016-02, Leases, to require lessees to recognize all leases, with limited exceptions, on the balance sheet, while recognition on the statement of operations will remain similar to legacy lease accounting, ASC 840. The ASU also eliminates real estate-specific provisions and modifies certain aspects of lessor accounting. Subsequently, the FASB issued ASU No. 2018-10 , Codification Improvements to Topic 842 Targeted Improvements Narrow-Scope Improvements for Lessors Codification Improvements In August 2017, the FASB issued ASU No. 2017-12, Targeted Improvements to Accounting for Hedging Activities In January 2018, the FASB issued ASU No. 2018-01, Land Easement Practical Expedient Transition to Topic 842 Leases |