There are many ways to spend $1,000. One could buy a brand-new flat-screen television, play the lottery, or keep it in a savings account. For people trying to increase their capital, though, investing in stocks easily beats out all three of those options -- provided, of course, that investors can pick the right companies to invest in.

For those with $1,000 to spare, let's consider two healthcare stocks worth investing in and holding onto for a long time: Vertex Pharmaceuticals (VRTX -0.06%) and HCA Healthcare (HCA -2.37%).

1. Vertex Pharmaceuticals

One key to success for biotech companies is to constantly develop novel therapies that are superior to the existing standards of care. Vertex has mastered this art. The drugmaker markets the only medicines that address the underlying genetic causes of cystic fibrosis (CF), a rare disease of the lungs. It isn't as though other companies haven't tried to crack this nut, but so far, all have failed.

That speaks volumes regarding Vertex's innovative abilities. The biotech has been rewarded for its troubles. Revenue, earnings, and free cash flow have increased rapidly.

VRTX Revenue (Quarterly) Chart

VRTX Revenue (Quarterly) data by YCharts

Vertex Pharmaceuticals isn't slowing down, though. The company is still developing brand-new CF drugs. In February, the biotech reported phase 3 results from a new CF therapy, which showed non-inferiority when pitted against its current crown jewel, Trikafta. This new treatment also showed more significant reductions in sweat chloride (CF patients have higher levels of it) compared to Trikafta.

That was despite the newer medicine's convenient once-daily dosing -- Trikafta is taken twice a day. Besides improving its existing lineup, Vertex Pharmaceuticals also wants to treat those CF patients who aren't eligible for its current medicines. The company is working on that project, too. Elsewhere, the biotech is expanding its lineup. It earned approval for Casgevy, a gene editing therapy for a pair of blood diseases, late last year.

In January, it also reported positive late-stage results for its potential pain treatment, VX-548. There are several more candidates in mid and late-stage testing that should make meaningful progress in the next few years, leading to a transformed lineup and even stronger financial results in the next five to 10 years. At a price tag of about $414, $1,000 affords two shares.

2. HCA Healthcare

HCA Healthcare is a leading hospital chain with facilities across much of the U.S. The company's business makes it hard for newcomers to pose a serious threat. Building dozens of medical facilities is hard enough. It involves jumping through various regulatory hoops and spending millions of dollars, but that's just step one. The next step is to build relationships with physicians, communities, and third-party payers. HCA Healthcare has already done all that.

That grants the company a serious advantage over new challengers. And even when pitted against existing competitors, HCA Healthcare has generally increased its market share. Between 2011 and 2022, it went from 23% to 28.5%. Naturally, HCA Healthcare's solid position has translated to strong financial results.

HCA Revenue (Quarterly) Chart

HCA Revenue (Quarterly) data by YCharts

It hasn't always been smooth sailing; the pandemic disrupted occupancy levels and the number of procedures performed in its facilities, which are key components in HCA Healthcare's revenue formula. The subsequent economic issues also strained its expenses and squeezed the bottom line. However, HCA Healthcare has been able to bounce back for the most part. The headwinds it has encountered lately were highly unusual.

They won't substantially alter HCA Healthcare's progress over the long run. The demand for the company's services will only increase with an aging population that needs more medical care. So, HCA Healthcare's robust position in its industry should lead to solid returns over the long run. Shares are trading for just under $322 apiece -- investors can grab three of them with $1,000.