Apple Inc.’s stock surged Wednesday after the technology giant beat profit expectations, but it still looks way undervalued relative to earnings-per-share growth.

The ratio of Apple’s share price AAPL, -1.77% to earnings per share for the last 12 months--P/E ratio (LTM)--has fallen from 17.06 in the first week of March to about 12.70 in midday trade, according to FactSet. Over the same time, the P/E ratio for the S&P 500 SPX, -0.58% has increased from 17.13 to about 18.60.