BOSTON — The Boston Celtics don’t just want to get Gordon Hayward to agree to a free-agent contract.

The Celtics need to make this deal happen.

And it’s not just because they have to get a consistent producer of offense on the wing to complement Isaiah Thomas (and vice versa) and change the way opponents can deal with them.

No, the Celtics, who made their presentation Sunday, need to get this done because of the math. This will be their last chance to shop in the Marquee Free Agent department for the foreseeable future.

After this summer they won’t have the necessary room on their credit card to do anything more than window shop when the big-time talents become available.

As it stands, the Celtics will have to pare down their roster to create room for a maximum contract that will be Hayward’s if he should choose to move to Boston.

But it’s not as if Danny Ainge can simply put that money back in the bank if he whiffs on the 6-foot-8 All-Star.

Thomas and Avery Bradley will be unrestricted free agents next summer. Marcus Smart will be a restricted free agent. All three will get paid, be it here or somewhere else.

The Celts probably can’t keep and sign all three, but whomever remains will take a severe bite out of their room under the cap and take them out of the free-agent game for the stars.

So it’s critical that Brad Stevens is able to successfully recruit Hayward for a second time. The pitch was necessarily different from when he got him to play at Butler, but it was similar in some ways, too.

No doubt Stevens long ago convinced Hayward he understood his game and could put him in the best positions to succeed, and, really, it will be the same now. Hayward has developed a very good relationship with Jazz Coach Quin Snyder and is said to be rightfully impressed with Heat Coach Erik Spoelstra.

But he has to have an important comfort level with Stevens that the Celtics hope can be a given as they tried to sell Hayward on the prospects of joining a team that won 53 games, made it to the Eastern Conference finals and is markedly ahead of schedule on a rebuild that he significantly would assist.

The Celtics could no longer tell him if he signs here, they will maybe even give up a little more than they want to take a shot with Paul George and create a club that could possibly have an edge on Cleveland in the race to the NBA finals.

The Pacers took that bargaining tool away by sending George to Oklahoma City, and now the Celtics are looking at more of a grind to reach the last series.

The finals are, however, a more realistic goal in closer proximity here than in Miami or Utah, and it’s fair to assume that the Celtics’ contingent was laying that reality on pretty thick Sunday. Something along the lines of “This is what happened here without you. What effect would adding a guy who averaged 21.9 points and shot 39.8 percent on 3-pointers have?”

No matter where he signs, Hayward almost certainly will sign a deal that gives him the option to sever after three years. That would bring him to 10 years in the NBA and make him eligible for the top-level maximum contract.

On each of the teams he is considering, he will be featured enough that he doesn’t have to worry about hurting his value and thus his chance at the bigger money.

To this point the Celtics have been able to avoid giving major dough to players who aren’t worth it. But if the move for Hayward falls through, they will be back to praying someone deserving of their assets becomes available. They will be hoping Jaylen Brown and Jayson Tatum take an accelerated route to their potential.

And even if that comes to fruition, the Celts will have lost their last chance for a while to add a ready-made star without surrendering key players or draft assets that could enhance the product even while it competes deep into the playoffs.

When the Celtics lost out on Kevin Durant last summer, they still had this summer.

In terms of free-agent pyrotechnics, July 2018 is currently not available to them.