Ryan McDonagh could have plotted a path that would have taken him to unrestricted free agency in three years.

Instead, the Blueshirts’ 24-year-old blue chip defenseman chose to commit to spending the next six seasons on Broadway by signing a deal of that length yesterday for $28.2 million, equating to $4.7 million per against the cap, a figure mutually equitable for the athlete and the club.

“I was hoping they were thinking multiple years, and then they started with six years, which was just right for me,” McDonagh, who had been a restricted free agent since Friday, said by phone. “It was great to see the Rangers have that confidence in me to make that offer.

“I’ve established a role here that I think fits me perfectly, and this is where I want to be. The team is so passionate about wanting to win, it’s really special to be a part of.”

McDonagh is a superior skater with a work ethic to match. He has emerged as Dan Girardi’s first-pair partner on the left side, given the extended absences of Marc Staal the past two seasons. Including the playoffs over those past two campaigns, McDonagh has played the third-most minutes (4,021) in the NHL behind only the Kings’ Drew Doughty (4,206) and Girardi (4,170).

“I want to continue to improve upon my skills,” McDonagh said. “Being in the playoffs for the third straight year, you see guys step up and make big plays in big moments. That’s what I want to really try and focus on.”

The University of Wisconsin product the Rangers stole from Montreal in the 2009 Scott Gomez trade after he was the Canadiens’ 12th overall selection in the 2007 Entry Draft — kind of the inverse of the Rick Middleton-Ken Hodge deal — became a go-to guy with John Tortorella behind the bench.

Now, McDonagh will go to work for Alain Vigneault.

“From what I hear from guys who have played for Vigneault, he’s very professional and respects both veterans and young guys and is honest with you,” said McDonagh, who has not yet spoken with the incoming head coach. “He’s a very relaxed coach who doesn’t cross the line.

“I have nothing but respect for Torts. He taught me a lot, especially about the mental side in how to handle the ups-and-downs of a season and a game.”

McDonagh, who recorded 19 points (four goals, 15 assists) in 47 games last season after getting 32 (7-25) in 82 games in 2011-12, said he committed to using his skills in order to become more involved at the offensive end of the rink.

“I have to get it in my mind where [getting up on the play] becomes natural,” McDonagh said. “I know being responsible in my own end comes first, but it’s so important to be involved at the offensive end to create second and third opportunities, keep the puck in the zone, or maybe create a turnover in the neutral zone from being up the ice.

“I’ll be thinking about that over the summer when I’m on the ice. I hope I can [contribute more on offense],” he said. “A lot of that is confidence in yourself, but I do see myself being more involved.”

With the contract behind him, McDonagh’s mind is clear to focus on his wedding, three weeks away.

“I’m very excited about that, and this makes it even more special,” McDonagh said. “I can take it all in with less stress.

“It will be great to not have this to worry about on such a special day.”

* The Rangers have between $6 million and $8 million of roster space with which to work to sign their remaining Group II free agents Derek Stepan, Carl Hagelin, Mats Zuccarello and Justin Falk.

Don Meehan, who represents Zuccarello, told The Post in an email, “As of now, our expectation is that we will re-sign with NY [rather than sign in Europe].”