How does a 14-loss team become a 15-win team in three seasons?

The obvious answer: It requires gutting that 14-loss team.

Head coach Kyle Shanahan and general manager John Lynch have done just that since they inherited a talent-bereft roster in 2017.

Shanahan was once asked if it was true that he wasn’t enamored with the offensive line the 49ers had when he took the job. He said that was accurate. And he added the line was probably the offensive position group he liked the most.

That explains why Pro Bowl left tackle Joe Staley and running back Raheem Mostert are the only offensive players from the 2016 team who are on the Super Bowl-bound 53-man roster.

There are just seven players from the 2016 edition who have stayed with the 49ers throughout the past three seasons, and that group includes key defensive players such as linemen DeForest Buckner and Arik Armstead and safeties Jimmie Ward and Jaquiski Tartt.

Still, the bulk of the roster reflects the handiwork of Lynch and Shanahan. Here’s a ranking of their top moves since their introductory news conference Feb. 7, 2017.

Note: The rankings consider a player’s impact, his salary and degree of difficulty in making the move. That is, it’s easier to select edge rusher Nick Bosa with the No. 2 overall pick than it is to locate tight end George Kittle with pick No. 146.

Another note: There are some notable omissions — trading for wideout Emmanuel Sanders in October, drafting right tackle Mike McGlinchey in the first round in 2018 and selecting wide receiver Deebo Samuel in the second round in 2019, among them.

It obviously takes more than 10 shrewd moves to gut a roster and go to a Super Bowl.

1. Drafting Kittle: The player selected the pick before Kittle in the fifth round in 2017: Michigan tight end Jake Butt, who has eight catches in an injury-plagued career.

The player selected the pick after Kittle: Kutztown guard Jordan Morgan, who was released by the XFL’s DC Defenders on Wednesday.

Meanwhile, Kittle owns the NFL season record for receiving yards by a tight end. And he owns the only two 1,000-yard seasons by a tight end in franchise history. And he routinely blocks linebackers into Livermore. And all that production has come for, relatively speaking, pennies: Kittle has earned $1.67 million in base salary in his first three seasons.

Is Joe Montana, pick No. 82, the only better draft choice in team history?

2. Trading for Jimmy Garoppolo: True, all the 49ers had to do was pick up the phone, listen to Bill Belichick, pick their jaw off the floor and say “yesweacceptrightnow.”

This stroke of good fortune was made possible by the Patriots’ head coach offering, out of the blue, Garoppolo in exchange for a second-round pick (No. 43 overall).

Still, if the 49ers didn’t employ Lynch and Shanahan, Belichick wouldn’t have called. He wanted Garoppolo to land in a good spot that wasn’t in the AFC and he respects Lynch, who briefly played for him, and Shanahan, whose dad, Mike, was once a title-winning peer of Belichick’s.

Put it this way: Belichick probably wouldn’t have made the same offer to Jim Tomsula and Trent Baalke.

3. Signing cornerback Richard Sherman: The 49ers were the first team to contact Sherman after he was released by the Seahawks in March 2018, and they made sure he didn’t leave Santa Clara without signing a contract when he visited.

The incentive-heavy contract Sherman negotiated himself was widely viewed as a team-friendly deal. But the 49ers assumed some risk by signing a nearly 30-year-old cornerback with two surgically repaired Achilles who played his first pain-filled season with the team with staples in one of his heels.

A year later, Sherman is a Pro Bowler, a second-team All-Pro and, even with him hitting his incentives, a bargain considering his performance.

Sherman earned about $13 million this season in salary and incentives, which is less than nine cornerbacks earn on an average-annual-salary basis.

4. Drafting inside linebacker Fred Warner: Baltimore head coach John Harbaugh said of Warner in November that “most people didn’t have (him) as a draft-pick guy” in 2018.

Good thing Harbaugh wasn’t running the 49ers’ draft room.

The 49ers have received a huge return on their modest third-round investment: The No. 70 pick has averaged 121 tackles and two forced fumbles in his first two seasons while earning just more than $1.1 million in base salary.

Warner has been durable (he hasn’t missed a game), dependable (he makes the defensive calls) and really dang good: He was named the NFC’s Defensive Player of the Month for November en route to being named a Pro Bowl alternate.

5. Drafting Bosa: It’s largely forgotten now, but there was talk the 49ers should select Alabama defensive tackle Quinnen Williams, who was viewed in some circles as the best regardless-of-position player in the draft in April.

Part of the argument against taking Bosa was his injury history and his locker-room fit because of his controversial social-media posts.

Of course, Bosa has started his NFL career by playing in 18 straight games, has been hailed as a terrific teammate and, um, is it possible for a rookie to become a Pro Football Hall of Fame candidate?

Bosa was that impressive in a debut season that included nine sacks, 25 QB hits, endless double-teams, one flag-planting celebration for Cleveland’s Baker Mayfield and a how-did-he-do-that, interception-and-run against Carolina.

6. Re-signing Ward: Sometimes the best moves are the ones that are ridiculed on social media.

Plenty of fans groaned when the 49ers re-signed the oft-injured defensive back (Twitter nickname: Hospital Ward) to a one-year, $4.5 million contract in March. And they screamed when Ward broke his collarbone in May. And they came unglued when Ward broke his finger before the season opener and missed the first two games.

And now? They are applauding. Ward has started the team’s past 14 games and was named a Pro Bowl alternate after playing a key role for the NFL’s best pass defense.

Follow the 49ers The 49ers are going to the Super Bowl and the San Francisco Chronicle is going with them. Subscribe to our Sporting Green newsletter for daily 49ers updates at https://www.sfchronicle.com/newsletters/sporting-green/

Read More

7. Picking up Armstead’s fifth-year option: This wasn’t viewed as a no-brainer when the 49ers decided in February to pay Armstead $9 million in 2019. One view: That’s a lot of scratch for a strong run defender who hadn’t shown he was much of a pass rusher.

Armstead had nine sacks in his 46 NFL games, and had managed four sacks in three seasons at Oregon.

As it turns out, it was money well spent. Armstead realized his first-round expectations in a 10-sack season that guarantees he’ll receive a raise next season — from the 49ers or another team.

8. Trading for left guard Laken Tomlinson: Take a bow, Martin Mayhew.

The 49ers’ personnel executive drafted Tomlinson in the first round in 2015, when Mayhew was the Lions’ general manager. And he played a role in acquiring him for a 2019 fifth-round pick before the 2017 season when Tomlinson was a backup and presumed bust in Detroit.

The bust is now a bulldozer. Tomlinson, known for his run-blocking power, has made 47 straight regular-season starts and was the only 49er to not a miss a snap this season, playing all 1,064.

9. Trading for pass rusher Dee Ford: After acquiring Ford for a 2020 second-round pick, the 49ers signed him to a five-year, $87.5 million contract in March.

In return for that hefty investment, Ford provided 6.5 sacks and played just 226 snaps in an injury-plagued regular season.

So what’s so great about this move? Ford transformed the pass rush when he was on the field. The 49ers had 39 sacks in their first 10 games with Ford (62-sack-season pace). They had nine sacks in their final six games when Ford played just four snaps (24-sack-season pace).

Ford will be on the field for Super Bowl LIV. And if he has a similar impact, he could be a major reason they win a title.

10. Signing cornerback K’Waun Williams: The first move made by Shanahan and Lynch was among their best.

In February 2017, 15 days after their introductory news conference, they signed a slot corner who hadn’t played in the NFL the previous season because of an ankle injury after he entered the league in 2014 through a rookie tryout camp.

No, you probably don’t remember where you were when the 49ers announced they signed Williams.

However, Williams, now one of the NFL’s best nickel cornerbacks, has made a big impact on one of the league’s best defenses. The 49ers quickly realized his value and smartly signed him to a three-year, $8.85 million contract extension after his third regular-season game with the team.

Eric Branch covers the 49ers for The San Francisco Chronicle. Email: ebranch@sfchronicle.com Twitter: @Eric_Branch