Thank you, Marvin, and to everyone for joining today.
Here are some key financial highlights for the second quarter ended June 30, 2021. Total revenue for the quarter was $1.038 million, an increase of 232% compared to $313,000 during the 3 months ended June 30, 2020. CGuard EPS had revenue of $1.019 million, an increase of 276% from $271,000 for the same period last year. This sales increase was mainly due to procedures with CGuard EPS, which are generally scheduled for nonemergency cases began this quarter to return to normal levels as compared to the 3 months ended June 30, 2020, when procedures with CGuard EPS were mostly postponed as hospitals shifted resources to patients affected by COVID-19. This increase in sales of CGuard was partially offset by a decrease of 55% in sales of MGuard Prime EPS from $42,000 during the 3 months ended June 30, 2020, to $19,000 during the 3 months ended June 30, 2021.
For the 3 months ended June 30, 2021, we had a gross profit of $262,000 compared to a gross loss of $120,000 during the 3 months in the same period last year. This increase in gross profit primarily resulted from a $237,000 increase in revenues less the related material and labor costs and a decrease in write-offs of $144,000, which were driven mainly by changes related to component supply issues.
Gross margin increased to 25.2% during the 3 months ended June 30, 2021, from a negative 38.3% during the 3 months ended June 30, 2020, for similar reasons as I just stated.
Total operating expenses for the quarter were $3.7 million, an increase of 59% compared to $2.3 million for the same period in 2020. This increase was primarily due to increases of $705,000 in salary expenses and related accrual expenses, mainly driven by temporary salary reductions during the 3 months ended June 30, 2020, that were implemented in response to the COVID-19 effect on revenues as well as additional resources, mainly in our product development and sales infrastructure; $437,000 in expenses related to the commencement of the C-Guardians FDA study; $315,000 in share-based compensation expenses due to the expense recognition of grants made after June 30, 2020; $297,000 in development expenses associated with CGuard EPS accessory solutions; and $108,000 of Directors and Officers Liability Insurance expense due to the increased premiums caused by recent trends in the overall insurance industry. This increase was partially offset by a decrease of $400,000 relating to a settlement agreement with an underwriter of our prior offerings, which occurred in the 3 months ended June 30, 2020, and a reduction of $86,000 of miscellaneous expense.
Net loss for the second quarter totaled $3.507 million or $0.46 per basic and diluted share compared to a net loss of $2.48 million or $2.93 per basic and diluted share for the same period in 2020. The average amount of shares outstanding used for the earnings per share calculation were 7.7 million in Q2 2021 and 845,000 in Q2 2020, both adjusted to reflect the 1:15 reverse split effected by us on April 26, 2021.
As of June 30, 2021, cash and cash equivalents were $41.4 million compared to $12.6 million as of December 31, 2020.
With that, I would now like to turn the call over for questions. Operator, please go ahead.