costs incurred for our product service and hydrogen site maintenance contracts and spare parts. At March 31, 2023, there were 20,154 fuel cell units and 95 hydrogen installations under extended maintenance contracts, an increase from 19,409 fuel cell units and 84 hydrogen installations at March 31, 2022, respectively. Cost of revenue from services performed on fuel cell systems and related infrastructure for the three months ended March 31, 2023 decreased 11.9%, or $1.7 million, to $12.2 million, compared to $13.9 million for the three months ended March 31, 2022. Gross loss decreased to (34.3%) for the three months ended March 31, 2023, compared to (68.4%) for the three months ended March 31, 2022. The decrease in cost of revenue and improvement in gross loss are both due primarily due to cost down and quality related initiatives.
Cost of revenue – provision for loss contracts related to service. The Company also recorded a provision for loss contracts related to service of $6.9 million for the three months ended March 31, 2023, compared to $2.1 million for the three months ended March 31, 2022, related primarily to new service contracts entered into during the first quarter of 2023.
Cost of revenue – Power Purchase Agreements. Cost of revenue from PPAs includes depreciation of assets utilized and service costs to fulfill PPA obligations and interest costs associated with certain financial institutions for leased equipment. At March 31, 2023, there were 117 GenKey sites associated with PPAs, as compared to 77 at March 31, 2022. Cost of revenue from PPAs for the three months ended March 31, 2023 increased 47.4%, or $15.1 million, to $46.8 million from $31.8 million for the three months ended March 31, 2022 due to the increase in units and sites under PPA contract as well as increased freight costs. Gross loss increased to (489.8%) for the three months ended March 31, 2023, as compared to (216.4%) for the three months ended March 31, 2022 primarily due to the provision for common stock warrants of $7.2 million for the three months ended March 31, 2023 compared to $1.0 million for the three months ended March 31, 2022.
Cost of revenue – fuel delivered to customers and related equipment. Cost of revenue from fuel delivered to customers and related equipment represents the purchase of hydrogen from suppliers that ultimately is sold to customers and costs for onsite generation. Cost of revenue from fuel delivered to customers for the three months ended March 31, 2023 increased 38.8%, or $15.2 million, to $54.5 million from $39.3 million for the three months ended March 31, 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 (437.4%) during the three months ended March 31, 2023, compared to (192.5%) during the three months ended March 31, 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.2 million and $0.7 million for the three months ended March 31, 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 March 31, 2023 increased $6.1 million, or 29.7%, to $26.5 million, from $20.5 million for the three months ended March 31, 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 March 31, 2023, increased $23.1 million, or 28.6%, to $104.0 million from $80.9 million for the three months ended March 31, 2022. This increase was primarily related to increased headcount, which resulted in increased salaries and stock-based compensation.