There are two inputs to the PEG ratio calculation: The P/E ratio, and the growth rate. Each of these inputs can be calculated in a variety of ways. The P/E ratio, for instance, can use either trailing earnings, or forward earnings, etc. And then, earnings themselves could even be adjusted in a number of ways. e.g. excluding unusual one time gains or costs, etc.
When it comes to the growth rate, it is much the same: there's a lot of data to choose from, and many ways to arrive at a result. Your own calculation's growth rate is historical, using the most recent fiscal year's earnings per share over the previous fiscal year's earnings per share. Another way to do it with historical data would be to look at the trailing 4 quarters, over the 4 quarters before those. (This lines up with the way you're doing it but only when the most recent quarter was a company's 4th.)
However, Morningstar indicates they are/may be using a consensus forward growth rate. Refer to Morningstar - PEG Ratio:
A stock's price/earnings ratio divided by the company's projected EPS
growth. [my emphasis]
The price/earnings ratio used in the numerator of this ratio is
calculated by taking the current share price and dividing by the mean
EPS estimate for the current fiscal year. A PEG Ratio means nothing in
itself, so for comparison we show the industry and S&P 500 averages.
What isn't clear to me is if that page is just describing the PEG ratio in general, or if it is factually accurate about Morningstar's own calculation method. I'd lean toward the latter because they are precise about the inputs, but if you want to rely on that, check the numbers yourself in the way they describe.
In any case, I would caution against using just a single year of earnings growth. I would also caution against using anybody's forward-looking projection, unless you know how it was arrived at and agree with the methodology.
For instance, when I want to consider the PEG ratio for a stock, I like to calculate a compound annualized growth rate from three to five years' worth of earnings. Moreover, if earnings over that period were choppy, I'd not have much confidence in the prediction value of the resulting rate, and I might look at the best year in the set to see if there were special items I could exclude from the earnings to get a more realistic (but lower) growth rate.