and utilities. Cannabis costs are affected by various state regulations that limit the sourcing and procurement of cannabis product, which may create fluctuations in gross profit over comparative periods as the regulatory environment changes.
Cost of goods sold are determined from costs related to the cultivation and processing of cannabis and cannabis-derived products as well as the cost of finished goods inventory purchased from third parties.
Cost of goods sold for the three months ended March 31, 2021 was $7,574,048, a decrease of $1,266,613 compared to the three months ended March 31, 2020 of $8,840,661, driven by higher throughput across all markets decreasing fixed cost per unit.
Gross profit for the three months ended March 31, 2021 was $5,615,841, representing a gross margin of 43%. This is compared to gross profit for the three months ended March 31, 2020 of $3,277,906 or a 27% gross margin. The increase in margin was driven by higher throughput across all markets decreasing fixed cost per unit. Maryland and Arizona wholesale gross profit for the three months ended March 31, 2021, increased $0.5 million and $0.8 million, respectively, relative to the three months ended March 31, 2020. Additionally, the Minnesota retail market saw gross profit expansion of approximately $1.3 million due to increased sales driven by the addition of four new dispensaries relative to March 31, 2020.
Our current production capacity has not been fully realized and we expect future gross profits to increase with revenue growth reflective of higher demand, increased product output and new product development. However, we expect gradual price compression as markets mature that could place downward pressure on our retail and wholesale gross margins.
Total Expenses
Total expenses other than the cost of goods sold consist of selling costs to support customer relationships, marketing, and branding activities. It also includes a significant investment in the corporate infrastructure required to support ongoing business.
Selling costs generally correlate to revenue. As a percentage of sales, we expect selling costs to remain relatively flat in its more established operational markets (Minnesota and New York) and decrease in developing markets as business continues to grow (Arizona, New Mexico, and Maryland). The increase is expected to be driven primarily by the growth of retail and wholesale channels to sustainable market share.
General and administrative expenses also include costs incurred at the corporate offices, primarily related to personnel costs, including salaries, benefits, and other professional service costs, as well as corporate insurance, legal and professional fees associated with being a publicly traded company. We expect this spend to decrease as a percentage of revenue as sales continue to ramp in all markets. We anticipate that share-based compensation expenses will continue to persist in order to recruit and retain competitive talent.
Total expenses for the three months ended March 31, 2021 were $10,728,571, an increase of $958,352 compared to total expenses of $9,770,219 for the three months ended March 31, 2020. The increase in total expenses was attributable to an increase general and administrative expenses of $1.2 million which was driven by significant operational buildouts in existing markets, specifically Arizona and Maryland, where we are in the process of large cultivation and manufacturing expansion projects.
Operating Loss before Income Taxes
Operating loss before other income (expense) and provision for income taxes for the three months ended March 31, 2021 was $(5,486,572), a decrease of $1,599,349 compared to $(7,085,921) for the three months ended March 31, 2020.