text: Energy Generation and Storage Segment 
  
  Cost of energy generation and storage revenue increased $473 million, or 40%, in the three months ended September 30, 
  
  2024 as compared to the three months ended September 30, 2023. Cost of energy generation and storage revenue increased 
  $1.39 billion, or 37%, in the nine months ended September 30, 2024 as compared to the nine months ended September 30, 
  2023. The increases in cost of revenues were primarily due to increases in Megapack and Powerwall deployments, partially 
  offset by increases in IRA manufacturing credits recognized as compared to the prior periods. 
  
  Gross margin for energy generation and storage increased from 24.4% to 30.5% in the three months ended 
  September 30, 2024 as compared to the three months ended September 30, 2023. Gross margin for energy generation and 
  storage increased from 18.0% to 26.6% in the nine months ended September 30, 2024 as compared to the nine months ended 
  September 30, 2023. The increases were primarily due to margin improvements for our energy storage products driven by cost 
  reductions, including benefits from IRA manufacturing credits, and a higher proportion of our storage business, which operated 
  at a higher gross margin, within the segment as compared to the prior periods. 