Item 7. MANAGEMENT’S DISCUSSION AND ANALYSIS OF FINANCIAL CONDITION AND RESULTS OF OPERATIONS

118K characters. Original on sec.gov · Markdown

Item 7. MANAGEMENT’S DISCUSSION AND ANALYSIS OF FINANCIAL CONDITION AND RESULTS OF OPERATIONS

| --- | --- |

The following discussion and analysis should be read in conjunction with the consolidated financial statements and the related notes included elsewhere in this Annual Report on Form 10-K.

Overview and 2018 Highlights

Our mission is to accelerate the world’s transition to sustainable energy. We design, develop, manufacture, lease and sell high-performance fully electric vehicles, solar energy generation systems and energy storage products. We also offer maintenance, installation, operation and other services related to our products.

Automotive

Our production vehicle fleet includes our Model S premium sedan and our Model X SUV, which are our highest-performance vehicles, and our Model 3, a lower-priced sedan designed for the mass market. We continue to enhance our vehicle offerings with enhanced Autopilot options, internet connectivity and free over-the-air software updates to provide additional safety, convenience and performance features. In addition, we have several future electric vehicles in our product pipeline, including Model Y, Tesla Semi, a pickup truck and a new version of the Tesla Roadster.

In 2018, we continued to scale our automotive operations, particularly our ramp of Model 3, and achieved total production of 254,530 vehicles and delivered 245,506 vehicles, representing year-over-year increases of approximately 152% and 138%, respectively.

Energy Generation and Storage

We lease and sell retrofit solar energy systems and sell renewable energy and energy storage products to our customers, and are ramping our Solar Roof product that combines solar energy generation with attractive, integrated styling. Our energy storage products, which we manufacture at Gigafactory 1, consist of Powerwall, mostly for residential applications, and Powerpack, for commercial, industrial and utility-scale applications.

During 2018, we deployed 1.04 GWh of energy storage products, nearly tripling our 358 MWh of energy storage deployments during 2017. We also deployed 326 megawatts (“MW”) of solar energy generation during 2018.

Management Opportunities, Challenges and Risks and 2019 Outlook

Automotive Demand, Production and Deliveries

Our goal is to produce the world’s highest quality vehicles as quickly and as cost-effectively as possible with a priority on workplace health and safety. The worldwide automotive markets for alternative fuel vehicles and self-driving technology are highly competitive and we expect them to become even more so. A growing number of companies, including established automakers, have announced plans to expand, and in some cases fully transition to, production of electric or environmentally friendly vehicles, and/or to develop self-driving technologies. However, we believe that the unique features of our vehicles, the safety aspects of each of our vehicles, our constant innovation, our growing brand, the increased affordability introduced with Model 3, the innovation and expansion of our global retail, service and charging operations and infrastructure and our future vehicles will continue to generate incremental demand for our vehicles by making our vehicles accessible to larger and previously untapped consumer and commercial markets.

Model 3 was the best-selling premium vehicle in the United States in 2018. Vehicles traded in to us by Model 3 customers continue to suggest the existence of a wider addressable market for this vehicle than existing owners of mid-sized premium sedans. Moreover, as we have offered only the long-range, mid-range and performance variants of Model 3 thus far, we believe that we will see increased demand with the introduction of less expensive variants, such as a version with a base price of $35,000 that we intend to offer in the future, and additional financing options. We commenced in January 2019 production of Model 3 for Europe and China, each of which we believe has a much larger mid-sized premium sedan market than North America, where we have exclusively delivered Model 3 to date. We also believe that we have an advantage over our competitors with respect to our battery and powertrain technology, as our vehicles’ EPA-rated range per kWh is expected to be superior to that of other electric vehicles to be introduced in the near term, and we have the ability to improve our vehicles through over-the-air software updates. We are producing variants (including regional versions) of Model 3 in accordance with the demand that we expect for them, however, and we have finite production capabilities with long lead times associated with procuring certain parts. If our Model 3 demand expectations prove inaccurate or we experience delays in introducing planned additional variants, including as we begin offering Model 3 in new markets, we may not be able to timely generate sales matched to the specific vehicles that we have the capacity to produce. We may also be impacted by trade policies, political uncertainty and economic cycles involving geographic regions where we have significant operations. Sales of vehicles in the automotive industry also tend to be cyclical in many markets, which may expose us to increased volatility as we expand and adjust our operations and retail strategies. In addition, the federal tax credit for the purchase of a qualified electric vehicle in the U.S. was reduced to $3,750 for any Tesla vehicle delivered during the first or second quarter of 2019, and will be further reduced to $1,875 for each Tesla vehicle delivered in the third or fourth quarter of 2019 and to $0 for each Tesla vehicle delivered thereafter. We believe that this phase-out likely pulled forward some vehicle demand into 2018 and could create similar pull-forwards in 2019 before each further step reduction in the federal tax credit. In the long run, we do not expect a meaningful impact to our sales in the U.S., as we believe that each of our vehicle models offers a compelling proposition even without incentives. Globally, we are also working to, and in some cases have already begun to, increase the value proposition and affordability of our offerings to customers and offer other financing arrangements over time. For example, we intend to introduce leasing options for Model 3.

Our Model 3 production ramped dramatically during 2018, and we expect to continue to grow Model 3 production to a sustained rate of 7,000 vehicles per week at our Tesla Factory by the end of 2019 as we ramp international deliveries. We remain focused on further cost improvements and on increasing the affordability of Model 3. Furthermore, in January 2019 we commenced construction of our Gigafactory Shanghai in China. We expect to build a production process that is optimized and simplified for Model 3 production, comprised of stamping, body joining and paint shops and general assembly, at Gigafactory Shanghai to begin production of certain trims of Model 3 for China by the end of 2019. We believe that the efficiencies of local production, as well as avoiding certain tariffs on U.S.-manufactured vehicles, will allow us to offer Model 3 at a lower average selling price in the largest market for electric vehicles in the world. Inclusive of Gigafactory Shanghai, our goal is to be able to produce 10,000 Model 3 vehicles per week on a sustained basis, and an annualized output rate in excess of 500,000 Model 3 vehicles sometime between the fourth quarter of 2019 and the second quarter of 2020. However, the timeframe for Gigafactory Shanghai is subject to a number of uncertainties, including regulatory approval, supply chain constraints, and the pace of installing production equipment and bringing the factory online. Ultimately, achieving increased Model 3 production cost-effectively will require that we timely address any additional bottlenecks that may arise as we continue to ramp, and establish sustained supplier capacity, including locally at Gigafactory Shanghai.

We also recently discontinued new custom orders for the 75 kWh versions of Model S and Model X to focus on longer range versions of our highest-performance flagship vehicles and further differentiate them from Model 3. We have gradually increased the level of option standardization across these models, and this latest step and our increasing production efficiency have allowed us to reduce the production hours for them while preserving the flexibility to increase output as necessary. As Model S and Model X are produced in the U.S., for the foreseeable future we could be impacted by increased import duties on components sourced from China, as well as by tariffs on vehicles exported to China, although we intend to partially divert such deliveries to North America and Europe, if necessary.

Advancing our customer-facing infrastructure remains a top priority. Delivering vehicles to our customers and the related logistics were challenging during 2018, but we continue to improve these processes to maximize customer satisfaction, including by purchasing our own car-hauling trucks. We are also expanding our servicing capabilities for our rapidly growing customer vehicle fleet, including by growing our service locations and Mobile Service fleet, moving to two-shift operations at service centers where needed, and optimizing our parts distribution network. We are also updating the Tesla mobile app for scheduling service appointments in order to increase customer convenience. As sales of Tesla vehicles ramp further, we plan to continue to open new Tesla retail locations, service centers and body shops around the world, and we plan to continue to expand our Mobile Service fleet. We also plan to continue to significantly increase the number of Superchargers and Destination Charging connectors globally, as well as evolve our Supercharger technology to enable faster charging times while reducing our related costs. However, we will have to stabilize and sustain our delivery and logistics model to deliver an increasing number of vehicles, and we have only limited experience with this at scale, particularly in markets outside of North America. Moreover, if our growing fleet of customer vehicles, particularly Model 3, experiences unexpected reliability issues, it could overburden our servicing capabilities.

Finally, we are making progress with our self-driving technology, as well as the Autopilot features in our vehicles. Our neural net and functionality continue to improve, and we frequently release minor software updates and from time to time release key version updates. Recently, we launched a “Navigate on Autopilot” feature that allows enabled Tesla vehicles under appropriate circumstances and driver input to change lanes, transition between freeways and exit freeways. While we are subject to regulatory constraints over which we have no control, our ultimate goal is to achieve full autonomy. Additionally, there is growing competition from other automobile and technology companies in the area of self-driving.

Energy Generation and Storage Demand, Production and Deployment

We are continuing to reduce customer acquisition costs of our energy generation products, transitioning away from former channel partners and shifting our sales strategy significantly to sell these products in Tesla stores and on our website and through cross-selling opportunities to our expanding base of vehicle owners. As we continue to implement this strategy, we expect that our retrofit solar system deployments will decrease slightly before stabilizing and growing in the second half of the year, including through cross-selling opportunities to our expanding base of vehicle owners. Our emphasis for retrofit solar products remains on executing projects for upfront cash generation and profitability, rather than absolute volume growth, such as by reducing the mix of leased systems and prioritizing residential installations that are combined with our energy storage products.

We are continuing with the design iterations and testing on our Solar Roof product, and we are continuing installations at a slow pace with the expectation that we will ramp production with significantly improved manufacturing capabilities during 2019.

We expect our energy storage products to continue to experience significant growth, and we are targeting to more than double our deployments to over 2 GWh in 2019. We see opportunities in North America as well as in Australia and Europe, where energy storage coupled with solar generation may mitigate typically higher electricity rates, as well as for projects to increase energy grid reliability. We are continuing to ramp production for these products at Gigafactory 1, including through a new production line, and we have seen further manufacturing efficiencies and improvements in our installation processes as we ramp.

Trends in Cash Flow, Capital Expenditures and Operating Expenses

Capital expenditures in 2019 are projected to be approximately $2.5 billion, mostly to support increases in Model 3 production capacity at Gigafactory 1 and the Tesla Factory, the establishment of Model 3 production capacity at Gigafactory Shanghai, and the addition of manufacturing capacity for Model Y, which we intend to produce in volume by the end of 2020, as well as the ongoing expansion of our retail locations, service centers, body shops, Mobile Service fleet, and Supercharger stations.

Generally, we expect operating expenses as a percentage of revenue to continue to decrease in the future due to increases in expected revenues and as we focus on increasing operational efficiency. In addition, due to our cost management efforts to maximize operational efficiency, we expect operating expenses in 2019 to grow by less than 10% from 2018.

In March 2018, our stockholders approved a new 10-year CEO performance award for Elon Musk with vesting contingent on achieving market capitalization and operational milestones (the “2018 CEO Performance Award”). Consequently, we may incur significant additional non-cash stock-based compensation expense over the term of the award as each operational milestone becomes probable of vesting.

Automotive Financing Options

We offer financing arrangements for our vehicles in certain markets in North America, Europe and Asia primarily through various financial institutions. We offer resale value guarantees or similar buy-back terms to certain customers who purchase vehicles and who finance their vehicles through one of our specified commercial banking partners. We also offer resale value guarantees in connection with automotive sales to certain leasing partners. Currently, both programs are available only in certain international markets. Resale value guarantees available for exercise within the 12 months following December 31, 2018 totaled $149.7 million in value.

We have adopted the new revenue recognition standard ASC 606 effective January 1, 2018. This impacts the way we account for vehicle sales with a resale value guarantee and vehicles leased through our leasing partners, which now generally qualify to be accounted for as sales with a right of return. In addition, for certain vehicles sales with a resale value guarantee and vehicles leased through leasing partners prior to 2018, we have ceased recognizing lease revenue starting in 2018 and record the associated cumulative adjustment to equity under the modified retrospective approach.

Vehicle deliveries with the resale value guarantee do not impact our near-term cash flows and liquidity, since we receive the full amount of cash for the vehicle sales price at delivery. While we do not assume any credit risk related to the customer, if a customer exercises the option to return the vehicle to us, we are exposed to liquidity risk that the resale value of vehicles under these programs may be lower than our guarantee, or the volume of vehicles returned to us may be higher than our estimates or we may be unable to resell the used vehicles in a timely manner, all of which could adversely impact our cash flows. To date, we have only had an insignificant number of customers who exercised their resale value guarantees and returned their vehicles to us. Based on current market demand for our vehicles, we estimate the resale prices for our vehicles will continue to be above our resale value guarantee amounts, but resale prices may inherently fluctuate depending on various factors such as supply and demand of our used vehicles, economic cycles and the pricing of new vehicles. Should market values of our vehicles or customer demand decrease, these estimates may be impacted materially.

We currently offer Model S and Model X leasing directly through our local subsidiaries in the U.S. and Canada. We also offer leasing through leasing partners in certain jurisdictions. Leasing through our captive financing entities and our leasing partners exposes us to residual value risk. In addition, for leases offered directly from our captive financing entities, we assume customer credit risk. We plan to continue expanding our financing offerings, including our lease financing options and the financial sources to support them, and to support the overall financing needs of our customers. To the extent that we are unable to arrange such options for our customers on terms that are attractive, our sales, financial results and cash flows could be negatively impacted.

Energy Generation and Storage Financing Options

We offer our customers the choice to either purchase and own solar energy systems or to purchase the energy that our solar energy systems produce through various contractual arrangements. These contractual arrangements include long-term leases and PPAs. In both structures, we install our solar energy systems at our customer’s premises and charge the customer a monthly fee. In the lease structure, this monthly payment is fixed with a minimum production guarantee. In the PPA structure, we charge customers a fee per kilowatt-hour, or kWh, based on the amount of electricity the solar energy system actually produces. The leases and PPAs are typically for 20 years with a renewal option, and the specified monthly fees are subject to annual escalations.

For customers who want to purchase and own solar energy systems, we also offer solar loans, whereby a third-party lender provides financing directly to a qualified customer to enable the customer to purchase and own a solar energy system designed, installed and serviced by us. We enter into a standard solar energy system sale and installation agreement with the customer. Separately, the customer enters into a loan agreement with a third-party lender, who finances the full purchase price. We are not a party to the loan agreement between the customer and the third-party lender, and the third-party lender has no recourse against us with respect to the loan.

Gigafactory 1

We continue to develop Gigafactory 1 as a facility where we work together with our suppliers to integrate production of battery material, cells, modules, battery packs and drive units in one location for vehicles and energy storage products. We also continue to invest in the future expansion of Gigafactory 1 and in additional production capacity there. For example, we have announced that we will likely manufacture Model Y at Gigafactory 1.

Panasonic has partnered with us on Gigafactory 1 with investments in the production equipment that it uses to manufacture and supply us with battery cells. Under our arrangement with Panasonic, we plan to purchase the full output from their production equipment at negotiated prices. As these terms convey to us the right to use, as defined in ASC 840, Leases, their production equipment, we consider them to be leased assets when production commences. This results in us recording the value of their production equipment within property, plant and equipment, net, on the consolidated balance sheets with a corresponding liability recorded to financing obligations. For all suppliers and partners for which we plan to purchase the full output from their production equipment located at Gigafactory 1, we will apply similar accounting. During the year ended December 31, 2018, we recorded $766.6 million on the consolidated balance sheet.

While we currently believe that our progress at Gigafactory 1 will allow us to reach our production targets, our ultimate ability to do so will require us to resolve the types of challenges that are typical of a production ramp. For example, we have in the past experienced bottlenecks in the assembly of battery modules at Gigafactory 1, which negatively affected our production of Model 3. While we continue to resolve such issues at Gigafactory 1 as they arise, given the size and complexity of this undertaking, it is possible that future events could result in the cost of building and operating Gigafactory 1 exceeding our current expectations and Gigafactory 1 taking longer to expand than we currently anticipate.

Gigafactory 2

We have an agreement with the SUNY Foundation for the construction of a factory with the intended capacity to produce at least 1.0 GW of solar products annually in Buffalo, New York, referred to as Gigafactory 2. In December 2016, we entered into an agreement with Panasonic under which it manufactures custom PV cells and modules for us, primarily at Gigafactory 2, and we purchase certain quantities of PV cells and modules from Panasonic during the 10-year term.

The terms of our agreement with the SUNY Foundation require us to comply with a number of covenants, and any failure to comply with these covenants could obligate us to pay significant amounts to the SUNY Foundation and result in termination of the agreement. Although we remain on track with our progress at Gigafactory 2, our expectations as to the cost of building the facility, acquiring manufacturing equipment and supporting our manufacturing operations may prove incorrect, which could subject us to significant expenses to achieve the desired benefits.

Gigafactory Shanghai

We are constructing Gigafactory Shanghai in order to significantly increase the affordability of Model 3 for customers in China by reducing transportation and manufacturing costs and eliminating certain tariffs on vehicles imported from the U.S. We broke ground in January 2019, and subject to a number of uncertainties, including regulatory approval, supply chain constraints, and the pace of installing production equipment and bringing the factory online, we expect to begin production of certain trims of Model 3 at Gigafactory Shanghai by the end of 2019. We expect much of the investment in Gigafactory Shanghai to be provided through local debt financing, supported by limited direct capital expenditures by us. Moreover, we are targeting the capital expenditures per unit of production capacity at this factory to be less than that of our Model 3 production at the Tesla Factory, from which we have drawn learnings that should allow us to simplify our manufacturing layout and processes at Gigafactory Shanghai.

Other Manufacturing

We continue to expand production capacity at our existing facilities and construct our planned facilities, and continually explore additional production capacity internationally.

Critical Accounting Policies and Estimates

The consolidated financial statements are prepared in accordance with accounting principles generally accepted in the U.S. (“GAAP”). The preparation of the consolidated financial statements requires us to make estimates and assumptions that affect the reported amounts of assets, liabilities, revenues, costs and expenses and related disclosures. We base our estimates on historical experience, as appropriate, and on various other assumptions that we believe to be reasonable under the circumstances. Changes in the accounting estimates are reasonably likely to occur from period to period. Accordingly, actual results could differ significantly from the estimates made by our management. We evaluate our estimates and assumptions on an ongoing basis. To the extent that there are material differences between these estimates and actual results, our future financial statement presentation, financial condition, results of operations and cash flows will be affected. We believe that the following critical accounting policies involve a greater degree of judgment and complexity than our other accounting policies. Accordingly, these are the policies we believe are the most critical to understanding and evaluating the consolidated financial condition and results of operations.

Revenue Recognition

Adoption of new revenue standard

On January 1, 2018, we adopted ASC 606, Revenue from Contracts with Customers, (“new revenue standard”) using the modified retrospective method. The new revenue standard had a material impact in our consolidated financial statements. For further discussion, refer to Note 2, Summary of Significant Accounting Policies, to the consolidated financial statements included elsewhere in this Annual Report on Form 10-K.

Automotive Segment

Automotive Sales Revenue

Automotive Sales 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 under the new revenue standard, including access to our Supercharger network, internet connectivity, Autopilot, full self-driving and over-the-air software updates. We recognize revenue on automotive sales upon delivery to the customer, which is when the control of a vehicle transfers. Payments are typically received at the point control transfers or in accordance with payment terms customary to the business. Other features and services such as access to our Supercharger network, internet connectivity and over-the-air software updates are provisioned upon control transfer of a vehicle and recognized over time on a straight-line basis as we have a stand-ready obligation to deliver such services to the customer. We recognize revenue related to these other features and services over the performance period, which is generally the expected ownership life of the vehicle or the eight-year life of the vehicle. Revenue related to Autopilot and full self-driving features is recognized when functionality is delivered to the customer. For our obligations related to automotive sales, we estimate standalone selling price by considering costs used to develop and deliver the service, third-party pricing of similar options and other information that may be available.

At the time of revenue recognition, we reduce the transaction price and record a reserve against revenue for estimated variable consideration related to future product returns. Such estimates are based on historical experience and are immaterial in all periods presented. In addition, any fees that are paid or payable by us to a customer’s lender when we arrange the financing are recognized as an offset against automotive sales revenue.

Costs to obtain a contract mainly relate to commissions paid to our sales personnel for the sale of vehicles. Commissions are not paid on other obligations such as access to our Supercharger network, internet connectivity, Autopilot, full self-driving and over-the-air software updates. As our contract costs related to automotive sales are typically fulfilled within one year, the costs to obtain a contract are expensed as incurred. Amounts billed to customers related to shipping and handling are classified as automotive revenue, and we have elected to recognize the cost for freight and shipping when control over vehicles, parts, or accessories have transferred to the customer as an expense in cost of revenues. Our policy is to exclude taxes collected from a customer from the transaction price of automotive contracts.

Automotive Sales with Resale Value Guarantee

We offer resale value guarantees or similar buy-back terms to certain international customers who purchase vehicles and who finance their vehicles through one of our specified commercial banking partners. We also offer resale value guarantees in connection with automotive sales to certain leasing partners. Under these programs, we receive full payment for the vehicle sales price at the time of delivery and our counterparty has the option of selling their vehicle back to us during the guarantee period, which currently is generally at the end of the term of the applicable loan or financing program, for a pre-determined resale value.

With the exception of two programs which are discussed within the Automotive Leasing section, we now recognize revenue when control transfers upon delivery to customers in accordance with the new revenue standard as a sale with a right of return as we do not believe the customer has a significant economic incentive to exercise the resale value guarantee provided to them. 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. The performance obligations and the pattern of recognizing automotive sales with resale value guarantees are consistent with automotive sales without resale value guarantees with the exception of our estimate for sales return reserve. Sales return reserves for automotive sales with resale value guarantees are estimated based on historical experience plus consideration for expected future market values. The two programs that are still being recorded as operating leases are discussed in further detail below in Vehicle Sales to Leasing Partners with a Resale Value Guarantee and a Buyback Option and Vehicle Sales to Customers with a Resale Value Guarantee where Exercise is Probable.

Prior to the adoption of the new revenue standard, all transactions with resale value guarantees were recorded as operating leases. The amount of sale proceeds equal to the resale value guarantee was deferred until the guarantee expired or was exercised. For certain transactions that were considered interest bearing collateralized borrowings as required under ASC 840, Leases, we also accrued interest expense based on our borrowing rate. The remaining sale proceeds were deferred and recognized on a straight-line basis over the stated guarantee period to automotive leasing revenue. The guarantee period expired at the earlier of the end of the guarantee period or the pay-off of the initial loan. We capitalized the cost of these vehicles on the consolidated balance sheet as operating lease vehicles, net, and depreciated their value, less estimated residual value, to cost of automotive leasing revenue over the same period.

In cases where our counterparty retained ownership of the vehicle at the end of the guarantee period, the resale value guarantee liability and any remaining deferred revenue balances related to the vehicle were settled to automotive leasing revenue, and the net book value of the leased vehicle was expensed to cost of automotive leasing revenue. If our counterparty returned the vehicle to us during the guarantee period, we purchased the vehicle from our counterparty in an amount equal to the resale value guarantee and settled any remaining deferred balances to automotive leasing revenue, and we reclassified the net book value of the vehicle on the consolidated balance sheet to used vehicle inventory.

Automotive Regulatory Credits

California and certain other states have laws in place requiring vehicle manufacturers to ensure that a portion of the vehicles delivered for sale in that state during each model year are zero-emission vehicles. These laws and regulations provide that a manufacturer of zero-emission vehicles may earn regulatory credits (“ZEV credits”) and may sell excess credits to other manufacturers who apply such credits to comply with these regulatory requirements. Similar regulations exist at the federal level that require compliance related to greenhouse gas (“GHG”) emissions and also allow for the sale of excess credits by one manufacturer to other manufacturers. As a manufacturer solely of zero-emission vehicles, we have earned emission credits, such as ZEV and GHG credits, on our vehicles, and we expect to continue to earn these credits in the future. We enter into contractual agreements with third-parties to purchase our regulatory credits. Payments for regulatory credits are typically received at the point control transfers to the customer, or in accordance with payment terms customary to the business. 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 statement of operations.

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 which continue to qualify for operating lease treatment. Prior to the adoption of the new revenue standard, all programs with resale value guarantees were accounted for as operating leases.

Direct Vehicle Leasing Program

We have outstanding leases under our direct vehicle leasing programs in certain locations in the U.S., Canada and Europe. Currently, the direct vehicle leasing program is only offered for new leases to qualified customers in the U.S. and Canada. 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. 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 to 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 in accordance with the new revenue standard, these transactions continue to be accounted for as interest bearing collateralized borrowings in accordance with ASC 840, Leases. Under this program, cash is received for the full price of the vehicle and the collateralized borrowing value is generally recorded within resale value guarantees and the customer upfront deposit is recorded within deferred revenue. We amortize the deferred revenue amount to automotive leasing revenue on a straight-line basis over the option period and accrue interest expense based on our borrowing rate. We capitalize vehicles under this program to operating lease vehicles, net, on the consolidated balance sheet, and we record depreciation from these vehicles to cost of automotive leasing revenue during the period the vehicle is under a lease arrangement. Cash received for these vehicles, net of revenue recognized during the period, is classified as collateralized lease (repayments) borrowings within cash flows from financing activities in the consolidated statement of cash flows.

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. In cases where the leasing partner retains ownership of the vehicle after the end of our option period, we expense the net value of the leased vehicle to cost of automotive leasing revenue.

On a quarterly basis, we assess the estimated market values of vehicles under our buyback options program to determine if we have sustained a loss on any of these contracts. 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, although we have not experienced any material losses during any period to date.

Vehicle Sales 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 sheet 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 sheet to used vehicle inventory.

Services and Other Revenue

Services and other revenue consists of non-warranty after-sales vehicle services, sales of used vehicles, sales of electric vehicle components and systems to other manufacturers, retail merchandise, and sales by our acquired subsidiaries to third party customers. There were no significant changes to the timing or amount of revenue recognition as a result of our adoption of the new revenue standard.

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.

Energy Generation and Storage Segment

Energy Generation and Storage Sales

Energy generation and storage revenues consists of the sale of solar energy systems and energy storage systems to residential, small commercial, and large commercial and utility grade customers. Sales of solar energy systems to residential and small scale commercial customers consist of the engineering, design, and installation of the system. Post-installation, residential and small scale commercial customers receive a proprietary monitoring system that captures and displays historical energy generation data. Residential and small scale commercial customers pay the full purchase price of the solar energy system upfront. Revenue for the design and installation obligation is recognized when control transfers, which is when we install a solar energy system and the system passes inspection by the utility or the authority having jurisdiction. Revenue for the monitoring service is recognized ratably as a stand-ready obligation over the warranty period of the solar energy system. Sales of energy storage systems to residential and small scale commercial customers consist of the installation of the energy storage system and revenue is recognized when control transfers, which is when the product has been delivered or, if we are performing installation, when installed and accepted by the customer. Payment for such storage systems is made upon invoice or in accordance with payment terms customary to the business.

For large commercial and utility grade solar energy system and energy storage system sales which consist of the engineering, design, and installation of the system, customers make milestone payments that are consistent with contract-specific phases of a project. Revenue from such contracts is recognized over time using percentage of completion method based on cost incurred as a percentage of total estimated contract costs. Certain large-scale commercial and utility grade solar energy system and energy storage system sales also include operations and maintenance service which are negotiated with the design and installation contracts and are thus considered to be a combined contract with the design and installation service. For certain large commercial and utility grade solar energy systems and energy storage systems where percentage of completion method does not apply, revenue is recognized when control transfers, which is when the product has been delivered to the customer for energy storage systems and when the project has received permission to operate from the utility for solar energy systems. Operations and maintenance service revenue is recognized ratably over the respective contract term. Customer payments for such services are usually paid annually or quarterly in advance.

In instances where there are multiple performance obligations in a single contract, we allocate the consideration to the various obligations in the contract based on the relative standalone selling price method. Standalone selling prices are estimated based on estimated costs plus margin or using market data for comparable products. Costs incurred on the sale of residential installations before the solar energy systems are completed are included as work in process within inventory in the consolidated balance sheets. However, any fees that are paid or payable by us to a solar loan lender would be recognized as an offset against revenue. Costs to obtain a contract relate mainly to commissions paid to our sales personnel related to the sale of solar energy systems and energy storage systems. As our contract costs related to solar energy system and energy storage system sales are typically fulfilled within one year, the costs to obtain a contract are expensed as incurred.

As part of our solar energy system and energy storage system contracts, we may provide the customer with performance guarantees that warrant that the underlying system will meet or exceed the minimum energy generation or retention requirements specified in the contract. In certain instances, we may receive a bonus payment if the system performs above a specified level. Conversely, if a solar energy system or energy storage system does not meet the performance guarantee requirements, we may be required to pay liquidated damages. Other forms of variable consideration related to our large commercial and utility grade solar energy system and energy storage system contracts include variable customer payments that will be made based on our energy market participation activities. Such guarantees and variable customer payments represent a form of variable consideration and are estimated at contract inception at their most likely amount and updated at the end of each reporting period as additional performance data becomes available. Such estimates are included in the transaction price only to the extent that it is probable a significant reversal of revenue will not occur.

We record as deferred revenue any non-refundable amounts that are collected from customers related to fees charged for prepayments and remote monitoring service and operations and maintenance service, which is recognized as revenue ratably over the respective customer contract term.

Energy Generation and Storage Leasing

For revenue arrangements where we are the lessor under operating lease agreements for energy generation and storage products, we record lease revenue from minimum lease payments, including upfront rebates and incentives earned from such systems, on a straight-line basis over the life of the lease term, assuming all other revenue recognition criteria have been met. The difference between the payments received and the revenue recognized is recorded as deferred revenue on the consolidated balance sheet.

For solar energy systems where customers purchase electricity from us under PPAs, we have determined that these agreements should be accounted for as operating leases pursuant to ASC 840. Revenue is recognized based on the amount of electricity delivered at rates specified under the contracts, assuming all other revenue recognition criteria are met.

We record as deferred revenue any amounts that are collected from customers, including lease prepayments, in excess of revenue recognized and operations and maintenance service, which is recognized as revenue ratably over the respective customer contract term. 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.

We capitalize initial direct costs from the origination of solar energy system leases or PPAs, which include the incremental cost of contract administration, referral fees and sales commissions, as an element of solar energy systems, leased and to be leased, net, and subsequently amortize these costs over the term of the related lease or PPA.

Inventory Valuation

Inventories are stated at the lower of cost or net realizable value. Cost is computed using standard cost for vehicles and energy storage products, which approximates actual cost on a first-in, first-out basis. In addition, cost for solar energy systems is recorded using actual cost. We record inventory write-downs for excess or obsolete inventories based upon assumptions about on current and future demand forecasts. If our inventory on-hand is in excess of our future demand forecast, the excess amounts are written-off.

We also review our inventory to determine whether its carrying value exceeds the net amount realizable upon the ultimate sale of the inventory. This requires us to determine the estimated selling price of our vehicles less the estimated cost to convert the inventory on-hand into a finished product. Once inventory is written-down, a new, lower cost basis for that inventory is established and subsequent changes in facts and circumstances do not result in the restoration or increase in that newly established cost basis.

Should our estimates of future selling prices or production costs change, additional and potentially material increases to this reserve may be required. A small change in our estimates may result in a material charge to our reported financial results.

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 sheet. Due to the adoption of the new revenue standard, automotive sales with resale value guarantees that were previously recorded within operating lease assets require a corresponding warranty accrual. Warranty expense is recorded as a component of cost of revenues in the consolidated statements of operations.

Stock-Based Compensation

We use the fair value method of accounting for our stock options and restricted stock units (“RSUs”) granted to employees and our employee stock purchase plan (the “ESPP”) to measure the cost of employee services received in exchange for the stock-based awards. The fair value of stock option awards with only service conditions and ESPP is estimated on the grant or offering date using the Black-Scholes option-pricing model. The Black-Scholes option-pricing model requires inputs such as the risk-free interest rate, expected term and expected volatility. These inputs are subjective and generally require significant judgment. The fair value of RSUs is measured on the grant date based on the closing fair market value of our common stock. The resulting cost is recognized over the period during which an employee is required to provide service in exchange for the awards, usually the vesting period, which is generally four years for stock options and RSUs and six months for the ESPP. Stock-based compensation expense is recognized on a straight-line basis, net of actual forfeitures in the period (prior to 2017, net of estimated projected forfeitures).

For performance-based awards, stock-based compensation expense is recognized over the expected performance achievement period of individual performance milestones when the achievement of each individual performance milestone becomes probable. For performance-based awards with a vesting schedule based entirely on the attainment of both performance and market conditions, stock-based compensation expense is recognized for each pair of performance and market conditions over the longer of the expected achievement period of the performance and market conditions, beginning at the point in time that the relevant performance condition is considered probable of achievement. The fair value of such awards is estimated on the grant date using Monte Carlo simulations.

As we accumulate additional employee stock-based awards data over time and as we incorporate market data related to our common stock, we may calculate significantly different volatilities and expected lives, which could materially impact the valuation of our stock-based awards and the stock-based compensation expense that we will recognize in future periods. Stock-based compensation expense is recorded in cost of revenues, research and development expense and selling, general and administrative expense in the consolidated statements of operations.

Income Taxes

We are subject to federal and state taxes in the U.S. and in many foreign jurisdictions. Significant judgment is required in determining our provision for income taxes, our deferred tax assets and liabilities and any valuation allowance recorded against our net deferred tax assets. We make these estimates and judgments about our future taxable income that are based on assumptions that are consistent with our future plans. Tax laws, regulations, and administrative practices may be subject to change due to economic or political conditions including fundamental changes to the tax laws applicable to corporate multinationals. The U.S., many countries in the European Union and a number of other countries are actively considering changes in this regard. As of December 31, 2018, we had recorded a full valuation allowance on our net U.S. deferred tax assets because we expect that it is more likely than not that our U.S. deferred tax assets will not be realized in the foreseeable future. Should the actual amounts differ from our estimates, the amount of our valuation allowance could be materially impacted.

Furthermore, significant judgment is required in evaluating our tax positions. In the ordinary course of business, there are many transactions and calculations for which the ultimate tax settlement is uncertain. As a result, we recognize the effect of this uncertainty on our tax attributes based on our estimates of the eventual outcome. These effects are recognized when, despite our belief that our tax return positions are supportable, we believe that it is more likely than not that those positions may not be fully sustained upon review by tax authorities. We are required to file income tax returns in the U.S. and various foreign jurisdictions, which requires us to interpret the applicable tax laws and regulations in effect in such jurisdictions. Such returns are subject to audit by the various federal, state and foreign taxing authorities, who may disagree with respect to our tax positions. We believe that our consideration is adequate for all open audit years based on our assessment of many factors, including past experience and interpretations of tax law. We review and update our estimates in light of changing facts and circumstances, such as the closing of a tax audit, the lapse of a statute of limitations or a change in estimate. To the extent that the final tax outcome of these matters differs from our expectations, such differences may impact income tax expense in the period in which such determination is made. The eventual impact on our income tax expense depends in part if we still have a valuation allowance recorded against our deferred tax assets in the period that such determination is made.

On December 22, 2017, the 2017 Tax Cuts and Jobs Act (“Tax Act”) was enacted into law making significant changes to the Internal Revenue Code. Changes include, but are not limited to, a federal corporate tax rate decrease from 35% to 21% for tax years beginning after December 31, 2017, the transition of U.S. international taxation from a worldwide tax system to a territorial system and a one-time transition tax on the mandatory deemed repatriation of foreign earnings. We were required to recognize the effect of the tax law changes in the period of enactment, such as re-measuring our U.S. deferred tax assets and liabilities as well as reassessing the net realizability of our deferred tax assets and liabilities. The Tax Act did not give rise to any material impact on the consolidated balance sheets and consolidated statements of operations due to our historical worldwide loss position and the full valuation allowance on our net U.S. deferred tax assets.

In December 2017, the Securities and Exchange Commission staff issued Staff Accounting Bulletin No. 118, Income Tax Accounting Implications of the Tax Cuts and Jobs Act (“SAB 118”), which allowed us to record provisional amounts during a measurement period not to extend beyond one year from the enactment date. As such, in accordance with SAB 118, we completed our analysis during the fourth quarter of 2018 considering current legislation and guidance resulting in no material adjustments from the provisional amounts recorded during the prior year.

Principles of Consolidation

The consolidated financial statements reflect our accounts and operations and those of our subsidiaries in which we have a controlling financial interest. In accordance with the provisions of ASC 810, Consolidation, we consolidate any variable interest entity (“VIE”) of which we are the primary beneficiary. We form VIEs with our financing fund investors in the ordinary course of business in order to facilitate the funding and monetization of certain attributes associated with our solar energy systems and leases under our direct vehicle leasing programs. The typical condition for a controlling financial interest ownership is holding a majority of the voting interests of an entity; however, a controlling financial interest may also exist in entities, such as VIEs, through arrangements that do not involve controlling voting interests. ASC 810 requires a variable interest holder to consolidate a VIE if that party has the power to direct the activities of the VIE that most significantly impact the VIE’s economic performance and the obligation to absorb losses of the VIE that could potentially be significant to the VIE or the right to receive benefits from the VIE that could potentially be significant to the VIE. We do not consolidate a VIE in which we have a majority ownership interest when we are not considered the primary beneficiary. We have determined that we are the primary beneficiary of a number of VIEs. We evaluate our relationships with all the VIEs on an ongoing basis to ensure that we continue to be the primary beneficiary. All intercompany transactions and balances have been eliminated upon consolidation.

Noncontrolling Interests and Redeemable Noncontrolling Interests

Noncontrolling interests and redeemable noncontrolling interests represent third-party interests in the net assets under certain funding arrangements, or funds, that we enter into to finance the costs of solar energy systems and vehicles under operating leases. We have determined that the contractual provisions of the funds represent substantive profit sharing arrangements. We have further determined that the appropriate methodology for calculating the noncontrolling interest and redeemable noncontrolling interest balances that reflects the substantive profit sharing arrangements is a balance sheet approach using the hypothetical liquidation at book value (“HLBV”) method. We, therefore, determine the amount of the noncontrolling interests and redeemable noncontrolling interests in the net assets of the funds at each balance sheet date using the HLBV method, which is presented on the consolidated balance sheet as noncontrolling interests in subsidiaries and redeemable noncontrolling interests in subsidiaries. Under the HLBV method, the amounts reported as noncontrolling interests and redeemable noncontrolling interests in the consolidated balance sheet represent the amounts the third-parties would hypothetically receive at each balance sheet date under the liquidation provisions of the funds, assuming the net assets of the funds were liquidated at their recorded amounts determined in accordance with GAAP and with tax laws effective at the balance sheet date and distributed to the third-parties. The third-parties’ interests in the results of operations of the funds are determined as the difference in the noncontrolling interest and redeemable noncontrolling interest balances in the consolidated balance sheets between the start and end of each reporting period, after taking into account any capital transactions between the funds and the third-parties. However, the redeemable noncontrolling interest balance is at least equal to the redemption amount. The redeemable noncontrolling interest balance is presented as temporary equity in the mezzanine section of the consolidated balance sheet since these third-parties have the right to redeem their interests in the funds for cash or other assets.

Business Combinations

We account for business acquisitions under ASC 805, Business Combinations. The total purchase consideration for an acquisition is measured as the fair value of the assets given, equity instruments issued and liabilities assumed at the acquisition date. Costs that are directly attributable to the acquisition are expensed as incurred. Identifiable assets (including intangible assets), liabilities assumed (including contingent liabilities) and noncontrolling interests in an acquisition are measured initially at their fair values at the acquisition date. We recognize goodwill if the fair value of the total purchase consideration and any noncontrolling interests is in excess of the net fair value of the identifiable assets acquired and the liabilities assumed. We recognize a bargain purchase gain within other income (expense), net, on the consolidated statement of operations if the net fair value of the identifiable assets acquired and the liabilities assumed is in excess of the fair value of the total purchase consideration and any noncontrolling interests. We include the results of operations of the acquired business in the consolidated financial statements beginning on the acquisition date.

When determining such fair values, we make significant estimates and assumptions. Critical estimates include, but are not limited to, future expected cash flows from the underlying assets and discount rates. Our estimate of fair values is based on assumptions believed to be reasonable but that are inherently uncertain and unpredictable. As a result, actual results may differ from our estimates. Furthermore, our estimates might change as additional information becomes available, as more fully discussed in Note 3, Business Combinations, included elsewhere in this Annual Report on Form 10-K.

Results of Operations

Revenues

Year Ended December 31,2018 vs. 2017 Change2017 vs. 2016 Change
(Dollars in thousands)201820172016$%$%
Automotive sales$17,631,522$8,534,752$5,589,007$9,096,770107%$2,945,74553%
Automotive leasing883,4611,106,548761,759(223,087)-20%344,78945%
Total automotive revenues18,514,9839,641,3006,350,7668,873,68392%3,290,53452%
Services and other1,391,0411,001,185467,972389,85639%533,213114%
Total automotive & services and other segment revenue19,906,02410,642,4856,818,7389,263,53987%3,823,74756%
Energy generation and storage segment revenue1,555,2441,116,266181,394438,97839%934,872515%
Total revenues$21,461,268$11,758,751$7,000,132$9,702,51783%$4,758,61968%

Automotive & Services and Other Segment

Automotive sales revenue includes revenues related to sale of new Model S, Model X and Model 3 vehicles, including access to our Supercharger network, internet connectivity, Autopilot, full self-driving and over-the-air software updates, as well as sales of regulatory credits to other automotive manufacturers. Our revenue from non-ZEV regulatory credits generally follows our production and delivery trends as we have long-term contracts with existing customers for the sale of these credits. However, as we do not have long-term contracts for ZEV credit sales, revenue from sale of ZEV credits fluctuate by quarter depending on when a contract is executed with a buyer. For example, our revenue from ZEV credit sales in the three months ended December 31, 2017 was $179.1 million while it was $0 in the three months ended June 30, 2018.

Automotive leasing revenue includes the amortization of revenue for Model S and Model X vehicles under direct lease agreements as well as those sold with resale value guarantees accounted for as operating leases under lease accounting. We do not yet offer leasing for Model 3 vehicles.

Services and other revenue consists of non-warranty after-sales vehicle services, sales of used vehicles, sales of electric vehicle components and systems to other manufacturers, retail merchandise, and sales by our acquired subsidiaries to third party customers.

2018 Compared to 2017

Automotive sales revenue increased $9.10 billion, or 107%, in the year ended December 31, 2018 as compared to the year ended December 31, 2017, primarily due to an increase of approximately 144,330 Model 3 deliveries from our significant production ramp in the year ended December 31, 2018, delivered at average selling prices that remained relatively consistent year-over-year. Additionally, we recognized $1.40 billion of additional automotive sales revenue due to the adoption of the new revenue standard and an increase of $58.3 million in sales of regulatory credits to $418.6 million in the year ended December 31, 2018. ZEV credits sales were $103.4 million and non-ZEV regulatory credits sales were $315.2 million in the year ended December 31, 2018, compared to $279.7 million ZEV credit sales and $80.6 million in non-ZEV regulatory credit sales in the year ended December 31, 2017. The growth in non-ZEV regulatory credits year-over-year was generally consistent with the delivery volume growth. The above increases in revenue were offset by a decrease of approximately 3,240 Model S and Model X deliveries during the year ended December 31, 2018, excluding the impact of adoption of the new revenue standard, at average selling prices that remained relatively consistent as compared to the year ended December 31, 2017.

Automotive leasing revenue decreased $223.1 million, or 20%, in the year ended December 31, 2018 as compared to the year ended December 31, 2017. The decrease was primarily due to a downward adjustment of $832.7 million from the adoption of the new revenue standard, partially offset by an increase in cumulative vehicles under our direct vehicle leasing program and an increase in the number of vehicles under leasing programs where our counterparty has retained ownership of the vehicle during or at the end of the guarantee period when compared to the year ended December 31, 2017. When our counterparty retains ownership, any remaining balances within deferred revenue and resale value guarantee are settled to automotive leasing revenue.

Services and other revenue increased $389.9 million, or 39%, in the year ended December 31, 2018 as compared to the year ended December 31, 2017. The increase was primarily due to an increase in used vehicle sales from an increased volume of trade-in vehicles, partially offset by lower average selling prices for used vehicles sales due to an increase in trade-ins of relatively lower priced non-Tesla vehicles in the year ended December 31, 2018. Additionally, there was an increase in non-warranty maintenance services revenue as our fleet continues to grow. These increases were partially offset by a decrease in powertrain sales to another automobile manufacturer as we wound down the program in 2017.

2017 Compared to 2016

Automotive sales revenue increased $2.95 billion, or 53%, in the year ended December 31, 2017 compared to the year ended December 31, 2016, primarily related to a 58% increase in deliveries to 80,060 vehicles resulting from increased sales of Model S and Model X, at average selling prices that remained relatively consistent as compared to the prior period, as well as sales of 1,764 Model 3 vehicles since its launch in the third quarter of 2017. Additionally, sales of regulatory credits increased by $58.0 million to $360.3 million in the year ended December 31, 2017. ZEV credits sales were $279.7 million and non-ZEV regulatory credits sales were $80.6 million in the year ended December 31, 2017, compared to $215.4 million ZEV credit sales and $86.9 million in non-ZEV regulatory credit sales in the year ended December 31, 2016. The increases were partially offset by additional deferrals of Autopilot 2.0 revenue in the year ended December 31, 2017.

Automotive leasing revenue increased $344.8 million, or 45%, in the year ended December 31, 2017 compared to the year ended December 31, 2016. The increase was primarily due to an approximately 30% increase in the number of vehicles under leasing programs or programs with a resale value guarantee compared to the year ended December 31, 2016. In addition, during the year ended December 31, 2017, we recognized an increase of $23.4 million of automotive leasing revenue upon early payoff and expiration of resale value guarantees as compared to the year ended December 31, 2016.

Service and other revenue increased $533.2 million, or 114%, in the year ended December 31, 2017 compared to the year ended December 31, 2016. This was primarily due to an increase in used vehicle sales as a result of increased automotive sales as well as from the expansion of our trade-in program. Additionally, there was a $41.1 million increase from the inclusion of engineering service revenue from Grohmann Engineering GmbH (now Tesla Grohmann Automation GmbH, which we acquired on January 3, 2017, and a $68.4 million increase in non-warranty maintenance services revenue as our fleet continued to grow during the year ended December 31, 2017.

Energy Generation and Storage Segment

Energy generation and storage revenue includes sale of solar energy systems and energy storage products, leasing revenue from solar energy systems under operating leases and PPAs and the sale of solar energy systems incentives.

2018 Compared to 2017

Energy generation and storage revenue increased by $439.0 million, or 39%, in the year ended December 31, 2018 as compared to the year ended December 31, 2017. The increase was primarily due to increases in deployments of Powerpack, Powerwall, and cash and loan solar energy systems projects. The increase in Powerpack revenue was significant year-over-year due to increases in revenue recognized for commercial projects, most predominantly $81.2 million for the South Australia battery project. Additionally, we increased Powerwall production in the year ended December 31, 2018, which helped us to continue to work through our energy storage order backlog.

2017 Compared to 2016

Energy generation and storage revenue increased by $934.9 million, or 515%, in the year ended December 31, 2017 compared to the year ended December 31, 2016, predominantly due to the inclusion of the full-year of revenue from our solar business, which we gained by acquiring SolarCity on November 21, 2016.

Cost of Revenues and Gross Margin

Year Ended December 31,2018 vs. 2017 Change2017 vs. 2016 Change
(Dollars in thousands)201820172016$%$%
Cost of revenues
Automotive sales$13,685,572$6,724,480$4,268,087$6,961,092104%$2,456,39358%
Automotive leasing488,425708,224481,994(219,799)-31%226,23047%
Total automotive cost of revenues14,173,9977,432,7044,750,0816,741,29391%2,682,62356%
Services and other1,880,3541,229,022472,462651,33253%756,560160%
Total automotive & services and other segment cost of revenues16,054,3518,661,7265,222,5437,392,62585%3,439,18366%
Energy generation and storage segment1,364,896874,538178,332490,35856%696,206390%
Total cost of revenues$17,419,247$9,536,264$5,400,875$7,882,98383%$4,135,38977%
Gross profit total automotive$4,340,986$2,208,596$1,600,685
Gross margin total automotive23%23%25%
Gross profit total automotive & services and other segment$3,851,673$1,980,759$1,596,195
Gross margin total automotive & services and other segment19%19%23%
Gross profit energy generation and storage segment$190,348$241,728$3,062
Gross margin energy generation and storage segment12%22%2%
Total gross profit$4,042,021$2,222,487$1,599,257
Total gross margin19%19%23%

Automotive & Services and Other Segment

Cost of automotive sales revenue includes direct parts, material and labor costs, manufacturing overhead, including depreciation costs of tooling and machinery, shipping and logistic costs, vehicle connectivity costs, allocations of electricity and infrastructure costs related to our Supercharger network, and reserves for estimated warranty expenses. Cost of automotive sales revenues also includes adjustments to warranty expense and charges to write down the carrying value of our inventory when it exceeds its estimated net realizable value and to provide for obsolete and on-hand inventory in excess of forecasted demand.

Cost of automotive leasing revenue includes primarily the amortization of operating lease vehicles over the lease term, as well as warranty expenses recognized as incurred. Cost of automotive leasing revenue also includes vehicle connectivity costs and allocations of electricity and infrastructure costs related to our Supercharger network for vehicles under our leasing programs.

Costs of services and other revenue includes costs associated with providing non-warranty after-sales services, costs to acquire and certify used vehicles, and costs for retail merchandise. Cost of services and other revenue also includes direct parts, material and labor costs, manufacturing overhead associated with the sales of electric vehicle components and systems to other manufacturers and sales by our acquired subsidiaries to third party customers.

2018 Compared to 2017

Cost of automotive sales revenue increased $6.96 billion, or 104%, in the year ended December 31, 2018 as compared to the year ended December 31, 2017. The increase was primarily due to a significantly higher volume of Model 3 vehicles deliveries in 2018 and the recognition of $969.8 million of additional cost of automotive sales revenue due to the adoption of the new revenue standard. These increases were partially offset by significant reductions in Model 3 average costs per unit compared to the year ended December 31, 2017 primarily due to temporary under-utilization of manufacturing capacity at lower production volumes in 2017 and other cost efficiencies. Additionally, there were lower overall costs for Model S and Model X cash deliveries from approximately 3,240 fewer units delivered year-over-year and reductions in combined Model S and Model X average costs per unit as a result of increased manufacturing efficiencies.

Cost of automotive leasing revenue decreased $219.8 million, or 31%, in the year ended December 31, 2018 compared to the year ended December 31, 2017. The decrease was primarily due to a downward adjustment of $624.4 million from the adoption of the new revenue standard, partially offset by increased cost of automotive leasing revenue from an increase in cumulative vehicles under our direct vehicle leasing program and an increase in the number of vehicles under leasing programs where our counterparty has retained ownership of the vehicle during or at the end of the guarantee period when compared to the year ended December 31, 2017. When our counterparty retains ownership, the net book value of the leased vehicle of the lease vehicle is expensed to cost of automotive leasing revenue.

Cost of services and other revenue increased $651.3 million, or 53%, in the year ended December 31, 2018 as compared to the year ended December 31, 2017. The increase was primarily due to the increase in the cost of our new service centers, additional service personnel in existing and new service centers, Mobile Service capabilities, parts distribution centers and investment in new body shops to provide maintenance services to our rapidly growing fleet of vehicles. Additionally, there was an overall increase in the cost of used vehicle sales from the increased volume of relatively lower priced non-Tesla trade-in vehicles. These increases were partially offset by a decrease in cost of powertrain sales to another automobile manufacturer as we wound down the program in 2017.

Gross margin for total automotive remained relatively consistent at 23% in the years ended December 31, 2018 and 2017. There were increases from improved Model S and Model X combined margins as costs per unit decreased year-over-year from continuing manufacturing efficiencies and an increase in regulatory credits sales, which have no associated costs. The increases were partially offset by margin dilution from Model 3 despite Model 3 margins improving year-over-year. The higher proportion of Model 3 as a percentage of our total automotive sales in the year ended December 31, 2018 lowered our overall gross margin for total automotive as Model 3 had a lower annualized margin than Model S and Model X due to temporary under-utilization of manufacturing capacity at lower production volumes in the first half of 2018 and as we have yet to achieve significant manufacturing efficiencies in the production of Model 3.

Gross margin for total automotive & services and other segment remained relatively consistent at 19% in the years ended December 31, 2018 and 2017 primarily due to the automotive gross margin impacts discussed above. Services and other has historically operated at lower margins than our automotive sales and leasing business but has a small impact on the overall segment margin because of its relatively small revenue base.

2017 Compared to 2016

Cost of automotive sales revenues increased $2.46 billion, or 58%, in the year ended December 31, 2017 compared to the year ended December 31, 2016. This was primarily due to a 58% increase in vehicle deliveries resulting from increased sales of Model S and Model X, as well as the commencement of deliveries of Model 3 in the third quarter of 2017.

Cost of automotive leasing revenue increased $226.2 million, or 47%, in the year ended December 31, 2017 compared to the year ended December 31, 2016. This was primarily due to an approximately 30% increase in the number of vehicles under leasing programs or programs with a resale value guarantee compared to the year ended December 31, 2016. In addition, during the year ended December 31, 2017, we recognized an increase of $23.4 million in cost of automotive leasing revenue upon early payoff and the expiration of resale value guarantees.

Cost of services and other revenue increased $756.6 million, or 160%, in the year ended December 31, 2017 compared to the year ended December 31, 2016, primarily due to the increase in cost of used vehicle sales due to increased volume and the increase in cost to provide maintenance services as our fleet continues to grow.

Gross margin for total automotive decreased from 25% to 23% in the year ended December 31, 2017 compared to the year ended December 31, 2016. The commencement of deliveries of Model 3 in the third quarter of 2017 whereby the full operating costs and depreciation were recorded at much lower production volumes as production ramps and increases in early payoffs and expirations of resale value guarantees year-over-year contributed to the lower gross margin. Lower material and manufacturing costs for Model S and Model X, as we further improved our vehicle production processes and the partial recognition of autopilot 2.0 revenue in the year ended December 31, 2017 partially offset the overall decrease.

Gross margin for total automotive & services and other segment decreased from 23% to 19% in the year ended December 31, 2017 compared to the year ended December 31, 2016. These decreases are driven by the factors impacting gross margin for total automotive, as explained above, as well as higher costs of maintenance service.

Energy Generation and Storage Segment

Cost of energy generation and storage revenue includes direct and indirect material and labor costs, warehouse rent, freight, warranty expense, other overhead costs and amortization of certain acquired intangible assets. In addition, where arrangements are accounted for as operating leases, the cost of revenue is primarily comprised of depreciation of the cost of leased solar energy systems, maintenance costs associated with those systems and amortization of any initial direct costs.

2018 Compared to 2017

Cost of energy generation and storage revenue increased by $490.4 million, or 56%, in the year ended December 31, 2018 as compared to the year ended December 31, 2017 primarily due to increases in deployments of Powerpack, Powerwall, and cash and loan solar energy system projects. The increase in Powerpack cost of revenue was significant year-over-year due to increases in cost of revenue recognized for commercial projects, most predominantly $72.5 million for the South Australia battery project. Additionally, costs for cash and loan solar energy system projects have increased from higher installation costs, higher allocation of overhead costs from lower deployment of solar projects overall, and certain warranty related one-time charges. There were also higher costs for our solar energy system leasing arrangements due to impairment charges and higher costs from temporary manufacturing under-utilization of our Solar Roof ramp.

Gross margin for energy generation and storage decreased from 22% to 12% in the year ended December 31, 2018 compared to the year ended December 31, 2017. The decrease was primarily due to the higher proportion of energy storage of our overall energy generation and storage portfolio, due to a three-fold growth of MWh of energy storage deployments in the year ended December 31, 2018. Although energy storage margins have improved significantly as compared to the year ended December 31, 2017, it continues to operate at a lower margin than our solar business, thereby having a greater dilutive impact on our gross margin in the year ended December 31, 2018. Additionally, increases in costs for our cash and loan solar energy system projects, impairment charges on solar energy system leasing arrangements, and temporary manufacturing under-utilization of our Solar Roof ramp have further contributed to the decrease in gross margin.

2017 Compared to 2016

Cost of energy generation and storage revenue increased by $696.2 million, or 390%, in the year ended December 31, 2017 compared to the year ended December 31, 2016. This was primarily due to the inclusion of the full-year of costs from our solar business, which we gained by acquiring SolarCity on November 21, 2016.

Gross margin for energy generation and storage increased from 2% to 22% in the year ended December 31, 2017 compared to the year ended December 31, 2016. This was predominantly due to the inclusion of the full-year of revenue and costs from our solar business, which we gained by acquiring SolarCity.

Research and Development Expense

Year Ended December 31,2018 vs. 2017 Change2017 vs. 2016 Change
(Dollars in thousands)201820172016$%$%
Research and development$1,460,370$1,378,073$834,408$82,2976%$543,66565%
As a percentage of revenues7%12%12%

Research and development (“R&D”) expenses consist primarily of personnel costs for our teams in engineering and research, manufacturing engineering and manufacturing test organizations, prototyping expense, contract and professional services and amortized equipment expense.

R&D expenses increased $82.3 million, or 6%, in the year ended December 31, 2018 compared to the year ended December 31, 2017. This increase was primarily due to an $84.2 million increase in employee and labor related expenses from headcount growth to support our business expansion and $45.2 million increase in stock-based compensation expense related to an increase in headcount and number of employee stock awards granted for new hire and refresher employee stock grants. Additionally, there was an increase of $16.0 million in facilities, freight, and depreciation expenses due to business expansion, offset by a $69.7 million decrease in expensed materials as there were higher costs in the year ended December 31, 2017 primarily related to Model 3 development.

R&D expenses increased $543.7 million, or 65%, in the year ended December 31, 2017 compared to the year ended December 31, 2016. This increase was primarily due to a $274.9 million increase in employee and labor related expenses from increased headcount as a result of our acquisitions as well as headcount growth from the expansion of our automotive and energy generation and storage businesses, and a $44.3 million increase in stock-based compensation expense related to an increase in headcount and number of employee stock awards granted for new hire and refresher employee stock grants. Additionally, there were increases in facilities expenses, depreciation expenses, professional and outside service expenses and expensed materials to support the development of future products.

Selling, General and Administrative Expense

Year Ended December 31,2018 vs. 2017 Change2017 vs. 2016 Change
(Dollars in thousands)201820172016$%$%
Selling, general and administrative$2,834,491$2,476,500$1,432,189$357,99114%$1,044,31173%
As a percentage of revenues13%21%20%

Selling, general and administrative (“SG&A”) expenses generally consist of personnel and facilities costs related to our stores, marketing, sales, executive, finance, human resources, information technology and legal organizations, as well as fees for professional and contract services and litigation settlements.

SG&A expenses increased $358.0 million, or 14%, in the year ended December 31, 2018 as compared to the year ended December 31, 2017. The increase was primarily due to a $193.1 million increase in stock-based compensation expense related to the 2018 CEO Performance Award and stock awards granted for new hires and refresher employee stock grants. Additionally, there was a $153.9 million increase in office, information technology and facilities-related expenses and sales and marketing activities to support our business expansion.

SG&A expenses increased $1.04 billion, or 73%, in the year ended December 31, 2017 compared to the year ended December 31, 2016. This increase was primarily due to a $524.0 million increase in employee and labor related expenses from increased headcount as a result of our acquisitions as well as headcount growth from the expansion of our automotive and energy generation and storage businesses, and a $64.9 million increase in stock-based compensation expense related to an increase in headcount and number of employee stock awards granted for new hire and refresher employee stock grants. Additionally, the increase was due to a $310.6 million increase in office, information technology and facilities-related expenses to support the growth of our business as well as sales and marketing activities to handle our expanding market presence and a $140.6 million increase in professional and outside service expenses to support the growth of our business.

Restructuring and other

Year Ended December 31,2018 vs. 2017 Change2017 vs. 2016 Change
(Dollars in thousands)201820172016$%$%
Restructuring and other$135,233$—$—$135,233N/A$—N/A
As a percentage of revenues1%0%0%

During 2018, we carried out certain restructuring actions in order to reduce costs and improve efficiency and recognized $36.6 million of employee termination expenses and estimated losses from sub-leasing a certain facility. The employee termination cash expenses of $27.3 million were substantially paid by the end of 2018, while the remaining amounts were non-cash. Also included within restructuring and other activities was $55.2 million of expenses (materially all of which were non-cash) from restructuring the energy generation and storage segment, which comprised of disposals of certain tangible assets, the shortening of the useful life of a trade name intangible asset and a contract termination penalty. In addition, we concluded that a small portion of the in-process research and development asset is not commercially feasible. Consequently, we recognized an impairment loss of $13.3 million.

In October 2018, a final court order was entered approving the terms of a settlement in connection with the SEC’s legal actions relating to Elon Musk’s prior consideration during the third quarter of 2018 of a take-private proposal for Tesla. Consequently, we recognized settlement and legal expenses of $30.1 million in the year ended December 31, 2018. These expenses were substantially paid by the end of 2018.

There were no restructuring actions in the years ended December 31, 2017 and 2016.

Interest Expense

Year Ended December 31,2018 vs. 2017 Change2017 vs. 2016 Change
(Dollars in thousands)201820172016$%$%
Interest expense$(663,071)$(471,259)$(198,810)$(191,812)41%$(272,449)137%
As a percentage of revenues3%4%3%

Interest expense increased by $191.8 million, or 41%, in the year ended December 31, 2018 as compared to the year ended December 31, 2017. The increase was primarily due to an increase in our average outstanding indebtedness at relatively consistent weighted average interest rates as compared to the year ended December 31, 2017. Additionally, there was a decrease of $70.0 million in the amount of interest we capitalized from the consolidated statement of operations to property, plant, and equipment on the consolidated balance sheets. Lower capitalization results in higher interest expense. The amount of interest we capitalize is driven by our construction in progress balance, which decreased year-over-year due to significant Model 3 capital expenditure ramp in the year ended December 31, 2017.

Interest expense increased by $272.4 million, or 137%, in the year ended December 31, 2017 as compared to the year ended December 31, 2016. The increase was primarily due to the inclusion of the full-year of interest expense from SolarCity of $185.5 million for the year ended December 31, 2017. In addition, our average outstanding indebtedness has increased in the year ended December 31, 2017 as compared to the year ended December 31, 2016 mainly due to the Convertible Senior Notes due in 2022 and the Senior Notes due in 2025, both of which we issued during 2017.

Other Income (Expense), Net

Year Ended December 31,2018 vs. 2017 Change2017 vs. 2016 Change
(Dollars in thousands)201820172016$%$%
Other income (expense), net$21,866$(125,373)$111,272$147,239Not meaningful$(236,645)Not meaningful
As a percentage of revenues0%-1%2%

Other income (expense), net, consists primarily of foreign exchange gains and losses related to our foreign currency-denominated monetary assets and liabilities and changes in the fair values of our fixed-for-floating interest rate swaps. We expect our foreign exchange gains and losses will vary depending upon movements in the underlying exchange rates.

Other income (expense), net, changed favorably by $147.2 million to a gain of $21.9 million in the year ended December 31, 2018 from a loss of $125.4 million in the year ended December 31, 2017. The change was primarily due to favorable fluctuations in foreign currency exchange rates and gains from interest rate swaps related to our debt facilities year-over-year. Additionally, we had $57.7 million of losses in the year ended December 31, 2017 for measurement period adjustments to the acquisition date fair values of certain SolarCity liabilities as previously reported in our Annual Report on Form 10-K for the year ended December 31, 2016, with no corresponding expense in the year ended December 31, 2018.

Other income (expense), net, changed unfavorably by $236.7 million to a loss of $125.4 million in the year ended December 31, 2017 from a gain of $111.3 million in the year ended December 31, 2016. The decrease was primarily due to $57.7 million of losses in the year ended December 31, 2017 for measurement period adjustments to the acquisition date fair value of SolarCity and fluctuations in foreign currency exchange rates.

Provision for Income Taxes

Year Ended December 31,2018 vs. 2017 Change2017 vs. 2016 Change
(Dollars in thousands)201820172016$%$%
Provision for income taxes$57,837$31,546$26,698$26,29183%$4,84818%
Effective tax rate-6%-1%-4%

Our provision for income taxes increased by $26.3 million, or 83%, in the year ended December 31, 2018 as compared to the year ended December 31, 2017. The increase was primarily due to the increase in taxable profits in certain foreign jurisdictions year-over-year.

Our provision for income taxes increased by $4.9 million, or 18%, in the year ended December 31, 2017 as compared to the year ended December 31, 2016. This increase was primarily due to the increase in vehicle deliveries in foreign tax jurisdictions, partially offset by $10.5 million of future U.S. alternative minimum tax refunds as a result of the Tax Act, which previously had an associated valuation allowance.

Net Income (Loss) Attributable to Noncontrolling Interests and Redeemable Noncontrolling Interests

Year Ended December 31,2018 vs. 2017 Change2017 vs. 2016 Change
(Dollars in thousands)201820172016$%$%
Net loss attributable to noncontrolling interests and redeemable noncontrolling interests in subsidiaries$(86,491)$(279,178)$(98,132)$192,687-69%$(181,046)184%

Our net income (loss) attributable to noncontrolling interests and redeemable noncontrolling interests was related to financing fund arrangements.

Liquidity and Capital Resources

As of December 31, 2018, we had $3.69 billion of cash and cash equivalents. Balances held in foreign currencies had a U.S. dollar equivalent of $749.0 million and consisted primarily of Chinese yuan, euros and Japanese yen. Our sources of cash are predominately from our deliveries of vehicles, sales and installations of our energy storage products and solar energy systems, proceeds from debt facilities, proceeds from financing funds and proceeds from equity offerings.

Our sources of liquidity and cash flows enable us to fund ongoing operations, research and development projects for new products, increases in Model 3 production capacity at the Tesla Factory, the establishment of Model 3 production capacity at Gigafactory Shanghai, the continued expansion of Gigafactory 1, the addition of manufacturing capacity for Model Y with the expectation to achieve volume production by the end of 2020, and the continued expansion of our retail and service locations, body shops, Mobile Service fleet and Supercharger network. We currently expect total 2019 capital expenditures to be approximately $2.5 billion.

In 2019, we will continue to utilize our increasing experience and learnings from past and current product ramps to do so at a level of capital efficiency per dollar of spend that we expect to be significantly greater than historical levels. For example, based on our experience with ramping Model 3 at the Tesla Factory, we expect that the capital spend per unit of Model 3 manufacturing capacity at Gigafactory Shanghai will be less than that of our line in Fremont. Likewise, based on such experience and the substantial commonality of components we expect between Model Y and Model 3, we believe that the production ramp of Model Y will be significantly faster than that of Model 3 and cost less per unit of manufacturing capacity than that of Model 3 at Fremont. Considering the pipeline of new products planned at this point, and consistent with our current strategy of using a partner to manufacture cells, as well as considering all other infrastructure growth and expansion of Gigafactory 1, Gigafactory 2 and Gigafactory Shanghai, we currently estimate that capital expenditures will be between $2.5 to $3.0 billion annually for the next two fiscal years. Moreover, we expect that the cash we generate from our core operations will generally be sufficient to cover our future capital expenditures and to pay down our near-term debt obligations (including the repayment of $920.0 million for our 0.25% Convertible Senior Notes due on March 1, 2019), although we may choose to seek alternative financing sources. For example, we expect that much of our investment in Gigafactory Shanghai will be funded through indebtedness arranged through local financial institutions in China. As always, we continually evaluate our capital expenditure needs and may decide it is best to raise additional capital to fund the rapid growth of our business.

We have an agreement to spend or incur $5.0 billion in combined capital, operational expenses, costs of goods sold and other costs in the State of New York during the 10-year period following full production at Gigafactory 2. We anticipate meeting these obligations through our operations at this facility and other operations within the State of New York, and we do not believe that we face a significant risk of default.

We expect that our current sources of liquidity together with our projection of cash flows from operating activities will provide us with adequate liquidity over at least the next 12 months. A large portion of our future expenditures is to fund our growth, and we can adjust our capital and operating expenditures by operating segment, including future expansion of our product offerings, retail and service locations, body shops, Mobile Service fleet, and Supercharger network. We may need or want to raise additional funds in the future, and these funds may not be available to us when we need or want them, or at all. If we cannot raise additional funds when we need or want them, our operations and prospects could be negatively affected.

In addition, we had $1.50 billion of unused committed amounts under our credit facilities and financing funds as of December 31, 2018, some of which are subject to satisfying specified conditions prior to draw-down (such as pledging to our lenders sufficient amounts of qualified receivables, inventories, leased vehicles and our interests in those leases, solar energy systems and the associated customer contracts, our interests in financing funds or various other assets; and contributing or selling qualified solar energy systems and the associated customer contracts or qualified leased vehicles and our interests in those leases into the financing funds). Upon the draw-down of any unused committed amounts, there are no restrictions on the use of such funds for general corporate purposes. For details regarding our indebtedness and financing funds, refer to Note 13, Long-Term Debt Obligations, and Note 18, Variable Interest Entity Arrangements, to the consolidated financial statements included elsewhere in this Annual Report on Form 10-K.

Summary of Cash Flows

Year Ended December 31,
(Dollars in thousands)201820172016
Net cash provided by (used in) operating activities$2,097,802$(60,654)$(123,829)
Net cash used in investing activities$(2,337,428)$(4,195,877)$(1,081,085)
Net cash provided by financing activities$573,755$4,414,864$3,743,976

Cash Flows from Operating Activities

Our cash flows from operating activities are significantly affected by our cash investments to support the growth of our business in areas such as research and development and selling, general and administrative and working capital, especially inventory, which includes vehicles in transit. Our operating cash inflows include cash from vehicle sales, lease payments directly from customers, customer deposits, sales of regulatory credits and energy generation and storage products. These cash inflows are offset by our payments to suppliers for production materials and parts used in our manufacturing process, employee compensation, operating lease payments and interest payments on our financings.

Net cash from operating activities changed favorably by $2.16 billion to net cash provided by operating activities of $2.10 billion during the year ended December 31, 2018 from net cash used in operating activities of $60.7 million during the year ended December 31, 2017. This favorable change was primarily due to the increase in net income, excluding non-cash expenses and gains, of $1.60 billion and the decrease in net operating assets and liabilities of $554.6 million. The decrease in net operating assets and liabilities was mainly driven by an increase in accounts payable and accrued liabilities, as a result of increased expenditures to support our ramp of Model 3 deliveries and a net decrease in operating lease vehicles and resale value guarantee liability primarily due to the adoption of the new revenue standard, wherein certain vehicle sales to customer or leasing partners with a resale value guarantee were previously accounted for as an in-substance operating leases are now accounted for as sales with a right of return upon control transfer. The increase in cash from certain operating activities was partially offset by the increase in accounts receivable and inventory, as a result of increased Model 3 and energy products deliveries and production. Additionally, there was a decrease in customer deposits primarily due to Model 3 fulfillments and an increase in other assets as we paid $141.3 million for the land use rights for Gigafactory Shanghai.

Net cash used in operating activities during the year ended December 31, 2017 decreased by $63.2 million as compared to the year ended December 31, 2016 due to the decrease in net operating assets and liabilities of $197.3 million partially offset by the decrease in net loss, excluding non-cash expenses and gains, of $134.1 million. The decrease in working capital was mainly driven by faster processing of payments for our vehicles and our focus on reducing inventory in the fourth quarter of 2017.

During the year ended December 31, 2016, cash used in operating activities was primarily a result of our net loss of $773.0 million, the increase in accounts payable and accrued liabilities of $750.6 million as our business expanded, the increase in resale value guarantees of $326.9 million and deferred revenue of $383.0 million as the number of vehicles with a resale value guarantee increased and the increase in customer deposits of $388.4 million primarily due to Model 3 reservations. These increases were partially offset by the increase in inventories and operating lease vehicles of $2.47 billion as we expanded our program for direct leases and vehicles with a resale value guarantee.

Cash Flows from Investing Activities

Cash flows from investing activities and their variability across each period related primarily to capital expenditures, which were $2.32 billion during 2018, $4.08 billion during 2017 and $1.44 billion during 2016. Capital expenditures during 2018 were $2.10 billion from purchases of property and equipment, mainly for Model 3 production and the expansion of our customer support infrastructure, and $218.8 million for the design, acquisition and installation of solar energy systems under operating leases with customers.

Capital expenditures during 2017 were $3.41 billion from purchases of property and equipment mainly for Model 3 production and $666.5 million for the design, acquisition and installation of solar energy systems under operating leases with customers. We also paid $114.5 million, net of the cash acquired, for acquisitions in 2017.

Capital expenditures during 2016 were $1.28 billion from purchases of property and equipment and $159.7 million for the design, acquisition and installation of solar energy systems under operating leases with customers. These expenditures were partially offset by the assumed cash of $342.7 million as a result of the SolarCity acquisition in 2016.

In 2014, we began construction of Gigafactory 1. We used $687.0 million, $1.45 billion, and $455.3 million of cash towards Gigafactory 1 construction during the years ended December 31, 2018, 2017, and 2016 respectively.

Cash Flows from Financing Activities

Cash flows from financing activities during the year ended December 31, 2018 consisted primarily of $1.18 billion of net borrowings under automobile asset-backed notes, $431.0 million of net borrowings under the senior secured asset-based revolving credit agreement (the “Credit Agreement”), $334.1 million from the issuance of solar asset-backed notes and $295.7 million of proceeds from exercises of stock options and other stock issuances. These cash inflows were partially offset by net repayments of $581.9 million under our vehicle lease-backed loan and security agreements (the “Warehouse Agreements”), collateralized lease repayments of $559.2 million, repayments of $230.0 million of the 2.75% Convertible Senior Notes due on November 1, 2018, and repayments of $210.2 million under the revolving aggregation credit facility. See Note 13, Long-Term Debt Obligations, and Note 2, Summary of Significant Accounting Policies, to the consolidated financial statements included elsewhere in this Annual Report on Form 10-K for further details regarding our debt obligations and collateralized borrowings, respectively.

Cash flows from financing activities during the year ended December 31, 2017 consisted primarily of $966.4 million from the issuance of the 2.375% Convertible Senior Notes due in 2022, $1.77 billion from the issuance of the 5.3% Senior Notes due in 2025 and $400.2 million from our March 2017 public offering of common stock, net of underwriter fees. However, we paid $151.2 million for the purchase of bond hedges net of the amount we received from the sale of warrants. Furthermore, we received $511.3 million of net proceeds from collateralized lease borrowings and $527.5 million of net proceeds from fund investors.

Cash flows from financing activities during the year ended December 31, 2016 consisted primarily of $1.70 billion from our May 2016 public offering of common stock, net of underwriter fees, $995.4 million of proceeds from issuances of debt net of repayments and $769.7 million of net proceeds from collateralized lease borrowings. The net proceeds from issuances of debt consisted primarily of $834.0 million of net borrowings under the Credit Agreement and $390.0 million of borrowings under the Warehouse Agreements, partially offset by settlements of $454.7 million for certain conversions of the 1.50% Convertible Senior Notes due in June 2018. Furthermore, we received $180.3 million of net proceeds from fund investors.

Contractual Obligations

We are party to contractual obligations involving commitments to make payments to third parties, including certain debt financing arrangements and leases, primarily for stores, service centers, certain manufacturing and corporate offices. These also include, as part of our normal business practices, contracts with suppliers for purchases of certain raw materials, components and services to facilitate adequate supply of these materials and services and capacity reservation contracts. The following table sets forth, as of December 31, 2018, certain significant obligations that will affect our future liquidity (in thousands):

Year Ended December 31,
Total20192020202120222023Thereafter
Operating lease obligations$1,628,154$275,654$256,931$230,406$182,911$157,662$524,590
Capital lease obligations, including interest1,461,236416,952503,545506,19723,8284,7765,938
Purchase obligations (1)18,088,1004,860,4313,255,9683,391,6373,985,3362,570,73023,998
Long-term debt, including scheduled interest (2)12,570,0822,583,1602,485,3722,260,5281,629,556302,3453,309,121
Total$33,747,572$8,136,197$6,501,816$6,388,768$5,821,631$3,035,513$3,863,647
(1)These amounts represent (i) purchase orders of $2.40 billion issued under binding and enforceable agreements with all vendors as of December 31, 2018 and (ii) $15.69 billion in other estimable purchase obligations pursuant to such agreements, primarily relating to the purchase of lithium-ion cells produced by Panasonic at Gigafactory 1, including any additional amounts we may have to pay vendors if we do not meet certain minimum purchase obligations. In cases where no purchase orders were outstanding under binding and enforceable agreements as of December 31, 2018, we have included estimated amounts based on our best estimates and assumptions or discussions with the relevant vendors as of such date or, where applicable, on amounts or assumptions included in such agreements for purposes of discussion or reference. In certain cases, such estimated amounts were subject to contingent events. Furthermore, these amounts do not include future payments for purchase obligations that were recorded in accounts payable or accrued liabilities as of December 31, 2018.
(2)Long-term debt, including scheduled interest, includes our non-recourse indebtedness of $3.61 billion. Non-recourse debt refers to debt that is recourse to only specified assets of our subsidiaries. Short-term scheduled interest payments and amortization of convertible senior note conversion features, debt discounts and deferred financing costs for the year ended December 31, 2019 is $361.2 million. Long-term scheduled interest payments and amortization of convertible senior note conversion features, debt discounts and deferred financing costs for the years thereafter is $1.58 billion.

The table above excludes unrecognized tax benefits of $243.8 million because if recognized, they would be an adjustment to our deferred tax assets.

Off-Balance Sheet Arrangements

During the periods presented, we did not have relationships with unconsolidated entities or financial partnerships, such as entities often referred to as structured finance or special purpose entities, which were established for the purpose of facilitating off-balance sheet arrangements or other contractually narrow or limited purposes.

Recent Accounting Pronouncements

See Note 2, Summary of Significant Accounting Policies, to the consolidated financial statements included elsewhere in this Annual Report on Form 10-K.

Previous: Item 6. SELECTED CONSOLIDATED FINANCIAL DATA · Next: Item 7A. QUANTITATIVE AND QUALITATIVE DISCLOSURES ABOUT MARKET RISK