increased 54.9%, or $22.8 million, to $64.5 million over $41.6 million for the three months ended June 30, 2022. The increase was primarily due to higher volume of hydrogen delivered to customer sites as a result of an increase in the number of hydrogen installations completed under GenKey agreements, inefficiencies in fueling systems and higher fuel costs. The gross loss increased to (260.5%) during the three months ended June 30, 2023, compared to (187.5%) during the three months ended June 30, 2022, primarily due to the increase in cost of revenue described above. Partially offsetting this increase in cost of revenue was a reduction to the provision for common stock warrants of $0.1 million and $0.8 million for the three months ended June 30, 2023 and 2022, respectively.
Cost of revenue from fuel delivered to customers for the six months ended June 30, 2023 increased 47.1%, or $38.1 million, to $119.0 million over $80.9 million for the six months ended June 30, 2022. The increase was primarily due to higher volume of hydrogen delivered to customer sites as a result of an increase in the number of hydrogen installations completed under GenKey agreements, inefficiencies in fueling systems and higher fuel costs. The gross loss increased to (324.5%) during the six months ended June 30, 2023, compared to (189.9%) during the six months ended June 30, 2022, primarily due to the increase in cost of revenue described above, as well as a reduction of revenue resulting from an increase in the provision for common stock warrants of $6.1 million and $1.5 million for the six months ended June 30, 2023 and 2022, respectively.
Expenses
Research and development expense. Research and development (“R&D”) expense includes: materials to build development and prototype units, cash and non-cash stock-based compensation and benefits for the engineering and related staff, expenses for contract engineers, fees paid to consultants for services provided, materials and supplies consumed, facility related costs such as computer and network services, and other general overhead costs associated with our research and development activities.
Research and development expense for the three months ended June 30, 2023 increased $5.7 million, or 24.2%, to $29.3 million, from $23.6 million for the three months ended June 30, 2022. The overall growth in R&D investment is commensurate with the Company’s future expansion into new markets, new product lines, acquisitions and varied vertical integrations.
Research and development expense for the six months ended June 30, 2023 increased $11.8 million, or 26.7%, to $55.8 million, from $44.0 million for the six months ended June 30, 2022. The overall growth in R&D investment is commensurate with the Company’s future expansion into new markets, new product lines, acquisitions and varied vertical integrations.
Selling, general and administrative expenses. Selling, general and administrative expenses includes cash and non-cash stock-based compensation, benefits, amortization of intangible assets and related costs in support of our general corporate functions, including general management, finance and accounting, human resources, selling and marketing, information technology and legal services.
Selling, general and administrative expenses for the three months ended June 30, 2023 increased $5.2 million, or 5.4%, to $101.2 million from $96.0 million for the three months ended June 30, 2022. This increase was primarily related to information technology and acquisition related costs.
Selling, general and administrative expenses for the six months ended June 30, 2023, increased $28.3 million, or 16.0%, to $205.2 million from $176.8 million for the six months ended June 30, 2022. This increase was primarily related to information technology, professional fees and acquisition related costs.
Impairment. Impairment for the three months ended June 30, 2023 increased to $10.0 million from $0 for the three months ended June 30, 2022. This increase was primarily related to a one-time contract expense of $9.8 million. Impairment for the six months ended June 30, 2023, increased to $11.1 million from $0 for the six months ended June 30, 2022. This increase was primarily related to a one-time contract expense of $9.8 million.