Giancarlo Stanton slogged through eight losing seasons in Miami, through 1,144 regular-season games before appearing in the playoffs.

So, for however frustrating it was for the former MVP to miss 144 games this season and constantly rehab a variety of injuries, everything Stanton always dreamed of remained within reach.

“That was terrible for me, so I just used [the playoffs] as this is what I built for. This is what I’m doing all this for, and just visualize what I can do,” Stanton said Thursday. “The tougher the day, the more repetitive it seemed, it was all looking forward to this.”

This, is why Stanton was acquired nearly two years ago. This, is why Stanton waived a no-trade clause from the only franchise he’d ever known. This, is what Stanton needs to validate his $325 million contract to fans barely given the chance to know him.

Because while one of the most prolific power hitters of all-time recovered from injuries to his biceps, shoulder and knee, the Yankees offense became more powerful than ever, hitting 306 home runs — one shy of the all-time record set by the Twins, their ALDS opponent.

While the highest-paid player on the team missed month after month, the Yankees didn’t appear to miss him, getting consistent production from unheralded outfielders like Cameron Maybin and Mike Tauchman.

But in returning for nine games at the end of the regular season, Stanton, 29, gave a glimpse of a ceiling few players in the sport can match, batting .286 (8-for-28) with two homers, two doubles, six RBIs and five walks.

“I feel good. I think those games were a really good brushup for me to get going this weekend,” Stanton said. “The timing is there. I’m glad I could get back for those.”

Entering his second postseason, Stanton believes he has a better idea of the magnitude of each moment. In last year’s playoffs, he homered in the wild-card win over the A’s, then batted .222 (4-for-18) with no extra-base hits in the ALDS loss to Boston.

“It’s kind of the battle of the least mistakes,” Stanton said. “Just be precise and just understand that every little thing counts.”

Stanton’s teammates carried him to October. And he remains capable of carrying them even further.

“He’s going to be ready. I’m excited for him. I know he missed a lot of time this year in the regular season, but he’s going to come through big for us,” Aaron Judge said. “Just what I’ve been seeing in the cages, just seen the past couple games, how he’s hammering the ball. His approach at the plate has been rock solid. It looks like he hasn’t even missed a game. It looks like he’s been playing since March.”