Grand Canyon Education Inc.’s shares soared Wednesday after the for-profit education company reported first-quarter results that far exceeded market expectations, and it issued a strong full-year forecast.

The Phoenix-based company, which offers both on-campus and online courses, reported after the market closed Tuesday that its net income increased nearly 45 percent to $20.9 million, or 46 cents per share, from $14.5 million, or 32 cents per share in the prior year. It earned 43 cents per share on an adjusted basis.

Revenue increased 21 percent to $142 million from $117.1 million last year, as enrollment increased.

Analysts polled by FactSet, on average, were expecting the company to earn 39 cents per share, on revenue of $137.9 million.

Grand Canyon also said that it expects to earn between $1.76 and $1.79 per share for the year on revenue between $577.5 million and $583.5 million. Analysts were anticipating earnings of $1.72 per share on revenue of $577.2 million.