variants, some of which could be resistant to existing vaccines, may lead to new shutdowns or business disruptions in the future. Overall, we recognize the challenges of launching in a pandemic, will continue to closely monitor events as they develop and plan for alternative and mitigating measures that we can implement if needed.
Financial Overview
Since our inception in 1997, we have devoted substantial resources to developing and seeking regulatory approval for Twirla, building our intellectual property portfolio, business planning, raising capital and providing general and administrative support for these operations. We incurred research and development expenses of $13.5 million, $9.9 million and $9.8 million during the years ended December 31, 2020, 2019 and 2018, respectively. We incurred research and development expenses of $0.9 million and $3.7 million for the three months ended June 30, 2021 and 2020, respectively. We incurred research and development expenses of $3.0 million and $6.8 million for the six months ended June 30, 2021 and 2020, respectively. While we anticipate that a portion of our operating expenses will continue to be related to research and development as we plan our post marketing studies, which include both our post marketing requirement and post marketing commitment to the FDA, and evaluate the development of our pipeline, our operating expenses have substantially shifted towards ongoing commercialization activities for Twirla.
We have funded our operations primarily through sales of common stock, convertible preferred stock, convertible promissory notes and term loans. As of June 30, 2021, and December 31, 2020, we had $31.1 million and $54.5 million in cash, cash equivalents and marketable securities, respectively.
In February 2020, we entered into a Credit Agreement and Guaranty with Perceptive Credit Holdings III, LP, a related party (“Perceptive”), for a senior secured term loan credit facility of up to $35.0 million (the “Perceptive Credit Agreement”), which was amended in February 2021 (“Amended Perceptive Credit Agreement”) to add a fourth tranche of $10.0 million, which is subject to the same interest rate and 1% fee payable upon the drawing of a tranche as set forth in the Amended Perceptive Credit Agreement. A first tranche of $5.0 million was funded on execution of the Perceptive Credit Agreement. A second tranche of $15.0 million was funded as a result of the approval of Twirla by the FDA. Another $25.0 million will be available in two separate tranches upon the achievement of certain revenue milestones. The facility will be interest only until the third anniversary of the closing date.
In February 2020, we completed a public offering of 17,250,000 shares of our common stock at a price of $3.00 per share. Proceeds from the public offering, net of underwriting discounts, commissions and offering expenses were approximately $48.4 million.
In March 2021, we entered into a common stock sales agreement (the “2021 ATM Agreement”) under which we are authorized to sell up to an aggregate of $50.0 million in gross proceeds through the sale of shares of common stock from time to time in “at-the-market” equity offerings (as defined in Rule 415 promulgated under the Securities Act of 1933, as amended). We agreed to pay a commission of up to 3% of the gross proceeds of any common stock sold under this agreement. During the six months ended June 30, 2021, we issued and sold a total of 5,113,971 shares of common stock under the 2021 ATM Agreement resulting in net proceeds of approximately $7.4 million, $7.0 million of which was received by June 30, 2021.
Moving forward, we plan to monitor our cash, cash equivalents and marketable securities balances, in an effort to ensure we have adequate liquidity to fund the operations of the Company. If the COVID-19 pandemic or other factors impact our current business plan or our ability to generate revenue from the launch of Twirla, we believe we have the ability to revise our commercial plans, including curtailing sales and marketing spending, to allow us to continue to fund our operations. In addition, we believe we may have the potential to access additional capital through the Amended Perceptive Agreement, the 2021 ATM, selling additional debt or equity securities or obtaining a line of credit or other loan as required.
We have generated minimal revenue and have never been profitable for any year. Our net loss was $51.9 million, $18.6 million and $19.8 million for the years ended December 31, 2020, 2019 and 2018, respectively. Our net loss was $17.6 million and $10.8 million for the three months ended June 30, 2021 and 2020, respectively. Our net loss was $34.8 million and $18.7 million for the six months ended June 30, 2021 and 2020, respectively. We expect to incur significant operating expenses for the foreseeable future as we continue to commercialize Twirla, advance our other potential product candidates and expand our research and development programs.