Developing game-changing medicine isn't easy, and it's certainly not cheap. It can cost hundreds of millions of dollars to create new drugs, and with a clinical trial failure rate of 90%, the risks to biotech companies are enormous. Yet, the reward can be even bigger when drugmakers get it right, and that's particularly evident at United Therapeutics (UTHR 1.52%), Gilead Sciences (GILD -0.56%), and Biogen Inc. (BIIB -1.53%), each of which boasts the best operating margins in the business.

Heart-thumping profitability

With an average cost of $144,070 in 2015, the pulmonary arterial hypertension drug (PAH) Remodulin is one of the world's most expensive medicines, and since Remodulin represents $152.4 million of United Therapeutics' $408.2 million in quarterly sales, it's not surprising that this company is the most profitable mid- to big-cap biotech stock in America.

The company's laser focus -- it markets five PAH medicines -- provides it with margin friendly scale and leverage, and a tight-fisted approach to costs helps, too. Last quarter, general and administrative costs were 10.3% of sales, down from 10.6% of sales a year ago.

A combination of  top-selling drugs in one of the more expensive indications and cost controls has allowed United Therapeutics' operating margin, or operating income divided by net sales, to be a remarkable 65%.

Unfortunately, the company's profitability could dip over the coming years.

During United Therapeutics' third-quarter conference call, management warned that drugs advancing into larger, more costly phase 3 trials will cause its research and development spending to tick higher. Furthermore, its profit margin could get crimped by the launch of Remodulin generics, which could reach the market in 2018.

Maximizing scale

Getting the bulk of sales from a limited number of indications has also helped Gilead Sciences become one of biotech's most profitable companies. Its dominance in HIV and hepatitis C treatment has turned it into a biotech behemoth with enviable margins.

The company's sales from drugs targeting these two indications total in the billions of dollars per quarter, and despite tough competition in HIV from ViiV Healthcare and in hepatitis C from AbbVie, Gilead Sciences continues to pass through big money to the bottom line.

Over the past year, Gilead Sciences' operating margin has totaled 63%, and that figure is even more impressive when we consider that sales fell about 10% year over year last quarter, and that its spending on researching next-generation therapies jumped to $1.1 billion from $743 million last year.

Competition is nipping at Gilead Sciences' heels and, admittedly, the company isn't as profitable as it was in 2015. However, it is still producing more profit per dollar of sales than its peers, and if its R&D investments pan out, it may only be a matter of time before this company starts growing again.

Money-making market share

Competition from oral drugs and generic drugs is reshaping the $19 billion market for multiple sclerosis (MS) medicine, but Biogen Inc. remains the market share leader in the indication.

Biogen's long-standing dominance in MS stems from Avonex and Tysabri, two commonly prescribed injection-based medicines that have been available for more than a decade yet are still selling at billion-dollar blockbuster clips. Recently, Biogen's MS market share has been bolstered by the widespread adoption of Tecfidera, an oral drug that costs over $50,000 per year and selling at an annualized $4.1 billion exiting Q3.

Tecfidera's success has allowed Biogen to maintain an industry-leading operating profit margin of 49.3% over the last 12 months. But management also deserves credit for its cost discipline. The company's SG&A was 15.4% of sales last quarter, down from 19.9% last year.

Biogen's bottom line isn't without risks, however, because new treatments are coming that could put a dent in the company's dominance. For example, the Food and Drug Administration is expected to make a decision to approve Roche's Ocrevus later this month, and if it gets the green light, it would become the first MS drug on the market that can be used both in relapsing MS and primary progressive MS.

Nevertheless, Biogen's got some interesting research underway in Alzheimer's disease that could insulate against competition in MS; and I don't think that its status as one of the most profitable biotechs in the world is going to change overnight.