period. Cost of goods sold for services and other revenue primarily consists of salaries and other personnel costs, travel related to services provided, costs of servicing equipment at customer sites, and all personnel and related costs for our laboratory services operation.
We expect that our cost of goods sold will increase or decrease to the extent that our revenue increases or decreases and depending on the mix of revenue in any specific period.
Gross profit is calculated as revenue less cost of goods sold. Gross margin is gross profit expressed as a percentage of revenue. Our gross profit in future periods will depend on a variety of factors, including: market conditions that may impact our pricing, sales mix among instruments, sales mix changes among consumables, excess and obsolete inventories, costs we pay our contract manufacturers for their services, our cost structure for lab service operations relative to volume, product warranty obligations, and inflationary cost pressures. Our gross profit in future periods will also vary based upon our channel mix and may decrease based upon our distribution channels.
Gross profit was $10.9 million compared to $8.5 million for the three months ended September 30, 2022 and 2021, respectively, and $31.3 million compared to $24.0 million for the nine months ended September 30, 2022 and 2021, respectively.
Operating expenses
Research and development. Research and development costs primarily consist of salaries, benefits, engineering/design costs, laboratory supplies, and materials expenses for employees and third parties engaged in research and product development. We expense all research and development costs in the period in which they are incurred.
We plan to continue to invest in our research and development efforts, including hiring additional employees, to enhance existing products and develop new products. As a result, we expect that our research and development expenses will continue to increase in absolute dollars in future periods. We expect these expenses to vary from period to period as a percentage of revenue.
Selling, general and administrative. Our selling, general and administrative expenses primarily consist of salaries and benefits for employees in our executive, accounting and finance, legal expenses related to intellectual property, sales and marketing, operations, and human resource functions as well as professional services fees, such as consulting, audit, tax and legal fees, general corporate costs, commercial sales functions, marketing, travel expenses, facilities, IT, and allocated overhead expenses. We expect that our sales, general and administrative expenses will continue to increase in absolute dollars, primarily due to increased headcount to support anticipated growth in the business and due to incremental costs associated with operating as a public company. Additionally, we expect an increase in absolute dollars as we expand our commercial sales, marketing and business development teams, increase our presence globally and increase marketing activities to drive awareness and adoption of our platform. We expect these expenses to vary from period to period as a percentage of revenue.
Change in fair value of contingent consideration. On September 28, 2018, the Company acquired substantially all the assets of the Quantitative Pathology Solutions (“QPS”) division of PKI. As part of the acquisition, on September 28, 2018, the Company entered into a License Agreement with PKI. Under the terms of the License Agreement, the Company agreed to pay PKI certain royalties as a percentage of future sales of products from the QPS division, in exchange for a perpetual license of the right to produce and sell QPS products. This contingent consideration is subject to remeasurement.
Depreciation and amortization. Depreciation and amortization expenses primarily consist of depreciation of property and equipment and amortization of acquired intangibles.