What happened

Shares of online-education enabler 2U (TWOU -3.73%) were up nicely on Friday, after the company reported results for the second quarter of 2020 that exceeded Wall Street's expectations. As of 3 p.m. EDT, the stock was up 7% for the session.

It's been quite a rebound for 2U stock. After falling hard earlier in the year, shares have now quadrupled from March lows as investors see a golden opportunity for online education in the coronavirus era.

TWOU Chart

TWOU data by YCharts

So what

2U generated revenue of $183 million in Q2, up 35% year over year. Much of this growth is attributable to its acquisition of Trilogy -- a company offering short non-accredited higher-education courses. Organic revenue was up just 18% from last year, with short courses providing a large portion of the growth.

Despite the revenue growth, 2U's net loss widened in Q2. The company reported a net loss of $66 million, compared to just $28 million last year. However, those numbers aren't as far apart as they appear. Last year, the company was helped by a one-time tax benefit.

Finally, 2U's free cash flow improved for the quarter. However, it was still negative. Over the last 12 months, the company has recorded negative free cash flow of $61 million. Last quarter, its negative free cash flow was $76 million on a trailing-12-month basis.

A person takes notes on paper while looking at a rising stock chart on a computer screen.

Image source: Getty Images.

Now what

Moving past 2U's quarterly numbers, it appears investors are more excited about the online-education opportunity created by COVID-19. Indeed, on its earnings call 2U's management discussed an internal survey that found more students are considering online education than ever before.

However, due to 2U's revenue structure, investors will need to be very patient for this to play out. When a college signs a deal with 2U, the company invests in the tech to develop the course. From there, it receives a percentage of a student's tuition. So these multi-year deals have high upfront expenses with revenue trickling in after. In the short term, that might not look great.

Long term (the term that matters when investing in stocks) it's reasonable to see societal tailwinds pushing 2U forward. And this could have a hidden financial benefit. Consider that the company is responsible for marketing its online courses. In 2019, marketing and sales were its largest expense by a mile. It spent $342 million while only generating revenue of $575 million.

If the coronavirus pushes the adoption of online higher education, it's possible 2U will need to spend less on advertising going forward. This is something worth watching in coming quarters and could quickly improve the company's finances.