SpaceX just might be the most popular company on Earth that everyone wants to invest in -- but that no one can.

Why is SpaceX so popular? Undoubtedly, part of its popularity stems from SpaceX's immense success in launching satellites and then landing the rockets safely back on Earth. That's a feat no one else has yet accomplished (although Blue Origin is getting closer). Elon Musk's widely publicized promise to put an astronaut on Mars, and to do so years before NASA is prepared to make the attempt, is doubtless another factor.

A rocket launch.

Image source: Getty Images.

But while these accomplishments explain SpaceX's popularity, they don't necessarily explain its popularity as an investment idea. Simply put: Lots of people might want to invest in SpaceX, but should they?

To answer that question, we need to figure out how SpaceX makes money, and how much that money (i.e., profit) is worth to investors.

Running the numbers

Many attempts have been made at sticking a value on SpaceX stock, and as with all things Google-able, Alphabet (GOOG 0.56%) (GOOGL 0.69%) -- the company originally known as Google -- finally helped us arrive at an answer last year. In January 2015, Alphabet invested $900 million for a 7.5% stake in SpaceX, thereby valuing the space company at $12 billion.

For the sake of the rest of this exercise, let's take that valuation as gospel.

Valuing SpaceX: Price-to-sales ratio

And we'd better, because that's the only gospel truth you'll find in this article. Unlike its backers such as Alphabet, and unlike its rivals such as Lockheed Martin (LMT 0.38%) and Boeing (BA -0.20%), SpaceX is a private company and thus not required by the SEC to divulge its financials in detail. Figuring out how SpaceX makes money, and how much money it's making, is therefore largely an exercise in guesswork.

With that in mind, let's get to guessing.

SpaceX makes the bulk of its money from engaging in just one activity: launching satellites into orbit. The company charges commercial customers a standard rate of $62 million per launch for this service. It charges perhaps $20 million more for more complicated government space missions such as resupplying the International Space Station, putting a science satellite into orbit for NOAA, or launching a GPS satellite for the Air Force.

Over the past four years, SpaceX launches have broken down roughly 60-40 in favor of commercial missions versus government launches. But to make the math easier and give SpaceX credit for becoming more competitive in government contracts bidding, let's split the difference and assume an average launch cost of $72 million per launch across SpaceX's entire manifest.

So far this year, SpaceX has launched six times. It's scheduled to conduct 12 more launches before the year is out -- 18 missions total. Times our $72 million blended cost per launch, that makes $1.3 billion our best guess at SpaceX's annual revenues.

Thus, SpaceX appears to have a price-to-sales ratio of 9.2 -- perhaps lower, if there are some other revenues lurking about that we're missing. But 9.2 times sales should be in the ballpark. And that right away sets up a huge contrast with incumbent space-launch providers Lockheed Martin and Boeing. According to data from S&P Global Market Intelligence, Lockheed Martin stock sells for just 1.5 times sales, while Boeing stock costs less than 0.9.

Valuing SpaceX: Price-to-earnings ratio

SpaceX is very open about saying that its commercial launches cost $62 million, but up until earlier this month, we were never quite sure what went into that cost. After Musk's presentation at the Code Conference at Rancho Palos Verdes earlier this month, however, we now know that the first stage of a Falcon 9 rocket costs somewhere between $30 million and $35 million to build -- and we know that the first stage makes up 70% of the total cost of building a Falcon 9.

Therefore, the "rocket" portion of a SpaceX rocket launch costs at most $50 million, including fuel costs, which Musk has previously estimated at about 0.3% of launch cost. That means that just $12 million per launch -- the $62 million that SpaceX charges minus the $50 million it costs to build the rocket -- must both pay for the company's overhead and provide its profits.

Mathematically speaking, this $12 million works out to a gross profit margin of 19%, which is superior to the 14.4% gross margin at Boeing and the 11.5% at Lockheed Martin. SpaceX is reputed to run a much tighter ship than its rivals, in terms of cost. But even if we assume a similar cost of overhead (Boeing, for example, spends about 4%), that still leaves SpaceX with as much as a 15% operating profit margin.

Applied to our estimated $1.3 billion in annual revenue, that works out to perhaps $195 million in annual operating profit -- and an "operating profit P/E ratio" of 61.5 on the stock (valuing SpaceX on its pretax profits, since we do not know its tax rate).

The upshot for investors

Is 61.5 times earnings too much to pay for SpaceX? Compared with analogous "operating profit P/E" ratios of 11.5 at Boeing, and 13.3 at Lockheed Martin, SpaceX stock certainly seems pricey. On the other hand, it also appears to be both more profitable and faster-growing than its rivals.

For the time being, that need not worry investors, who can't invest in the company directly in any case. On the other hand, if you're still dead set on buying and think SpaceX is a bargain, you can at least own a small sliver of SpaceX by investing in Alphabet.