BOSTON — It’s not rocket science. When Gordon Hayward plays well, so do the Boston Celtics.

But Hayward struggled early this season to find rhythm or consistency while working his way back from his gruesome leg injury. In fact, those struggles carried over into the new calendar year, and it was swiftly becoming more and more difficult to see the light at the end of the tunnel.

But recently he appears to be gaining back that one quality that escaped him following the most serious injury of his career: confidence. Because with Hayward, the talent was always there. At 28 years old and with his leg completely healed at the start of the season, so was his athleticism.

For him, it was all about having the belief in himself to make plays and hit shots like he became so accustomed to doing with Utah. It was seen in spurts in the first half of the season, but his rare standout performances were often overshadowed by underwhelming duds sandwiched in between.

The numbers don’t lie: When Hayward scores at least 10 points the Celtics are 24-7; when he scores at least a dozen, they’re 20-4; and when he shoots at least 50 percent from the field the Celtics are almost unbeatable at 19-2.

Regardless of where the Celtics end up in the standings, they’ll need Hayward at his best to string together the postseason run so many people expected when this year’s journey began.

Fortunately, it’s looking increasingly more likely he will be.

If it’s one thing we can take from Hayward’s recent play, it’s encouragement. He’s moving well and doesn’t look stiff or uncomfortable. He’s attacking the basket, hitting his open (and contested) jumpers with more regularity, and perhaps most importantly, hasn’t been afraid to shoot or take over when the game’s on the line.

It’s unlikely Hayward will get back to his 20-point, 5-rebound, 4-assist nightly averages from his Utah days, especially while playing for such a deep Celtics team. But if he can produce 15-plus points per night, sprinkle in more 30-point outbursts and play the hard-nosed defense he’s capable of, Boston’s hopeful playoff run will be much, much easier.

Of course he’s not the only factor. Point guard Kyrie Irving – who’s been in the news lately for all the wrong reasons but did apologize for the way he’s handled things with the media – is quietly averaging 23.4 points per game to go with career bests in assists (7.0), rebounds (4.9), field-goal percentage (49.8) and 3-point field-goal percentage (41.9). His durability moving forward will obviously be a difference maker.

Grabbing the No. 3 or 4 seed and wrapping up home court for Round 1 would be a huge advantage, but even if they remain No. 5, teams should fear playing the Celtics – especially if the Hayward of old continues to shine.