It may seem like a waste of time to calculate a stock's investment return and total dollar amount after a certain period. After all, that's backward-looking, and investments require forward-thinking and projections about the future. However, it's useful to look at the past before committing to an investment. Understanding what happened to a company and its stock can help gauge a company's future potential.

D-Wave Quantum's (QBTS -2.37%) share price has performed very well this year, gaining over 216% through Sept. 26. That trounced the S&P 500's (^GSPC 0.41%) gain of 13%.

But how would shareholders have done if they'd invested $1,000 in the stock three years ago?

Someone holding a calculator.

Image source: Getty Images.

Comparative investment returns

Over three years, D-Wave Quantum's shares gained 313.5%. The company doesn't pay dividends, so that doesn't factor into the return calculation.

The stock's performance easily bested the S&P 500's 79.9%, Nasdaq Composite's (^IXIC 0.30%) 106.9%, and S&P MidCap 400's 45.7% returns.

The last two indexes are relevant benchmarks for D-Wave, given that the Nasdaq Composite includes many technology companies and the stock's $9 billion market capitalization puts it in the mid-cap category.

Translating these returns into dollar figures, at the end of three years, your $1,000 investment in D-Wave's stock would've resulted in $4,135. That same investment in the S&P 500 would be worth $1,799. A passive investment in the Nasdaq Composite or S&P MidCap 400 index would've resulted in $2,069 and $1,457, respectively.

Where does D-Wave go from here?

D-Wave Quantum doesn't report a profit under generally accepted accounting principles (GAAP). It lost $167.3 million in Q2, wider than the $17.8 million loss a year ago. The company also doesn't have much revenue, reporting just $3.1 million in the latest period.

Since the company doesn't report a profit, investors can't use the price-to-earnings ratio as a valuation metric. Turning to the price-to-sales ratio, D-Wave's stock sells at an eye-popping 298 times.

That's a very richly valued company with scant revenue and no earnings.