Shares of cable and internet giant Comcast (CMCSA 0.14%) are on the rise this afternoon, up 2.6% through 1:10 p.m. ET after beating on earnings in the morning.

Heading into Comcast's Q2 report, analysts forecast the company would earn $1.18 per share, adjusted for one-time items, on $29.8 billion in sales. Instead, Comcast earned $1.25 per share on sales of $30.3 billion.

Glowing green stock arrow rises.

Image source: Getty Images.

Comcast Q2 earnings

Sales inched only 2% higher year over year, and adjusted net income was up only 3% -- but earnings per share as calculated according to generally accepted accounting principles (GAAP) nearly tripled to an astounding $2.98, and free cash flow more than tripled to $4.5 billion.

That alone would more than explain investors' enthusiasm today.

Is Comcast stock a buy?

Comcast didn't give guidance for how the rest of the year will play out, and analysts who follow the stock might be in for a surprise. According to Yahoo! Finance data, earnings are only supposed to grow a penny (year over year) in Q3, and to decline in Q4 -- resulting in full-year 2025 profit declining $0.02 to $4.31 per share. Comcast's tremendous Q2, however, just delivered nearly three-quarters of the year's forecast profit in a single quarter, setting up Comcast to potentially thrash expectations by the end of this year.

Meanwhile, Comcast stock trades for a mere 5 times trailing earnings -- which might be the right price if earnings are shrinking, but could be incredibly cheap if earnings grow like it looks like they're going to. Even factoring Comcast's $100 billion-plus debt load into the picture, a stock that costs 5.3x earnings, pays a 4.1% dividend, and shows any growth at all would seem cheap to me.

Comcast stock is a buy.