Marcio Jose Sanchez/Associated Press

The San Francisco 49ers' salary-cap situation has them pressed right up against the probable limit in 2015. As things currently stand, the 49ers are projected to be roughly $1.3 million under a projected $140 million salary cap, per OverTheCap.com. You’ll find similar numbers at sites like Spotrac and Niners Nation, varying only on a couple of contracts. The 49ers, basically, are brushed up right against the limit of what a team is allowed to spend.

They aren’t done spending, however. Assuming the 49ers use all nine draft picks they are projected to receive, that will cost them nearly $5.5 million against the salary cap.

You may have noticed that $5.5 million is larger than $1.3 million, numerically speaking. That means that before the 49ers can even think about signing any free agents, they must first go to work on their current contracts to create some more cap space.

Fortunately, there are a number of areas where the 49ers can cut, extend or renegotiate contracts to create cap room. With key free agents like Chris Culliver and Mike Iupati entering the open market this offseason, some prudent and judicious roster moves will have to be made to field the best possible team in 2015.

Let’s go position-by-position and look at San Francisco’s current salary-cap situation. We can see which players are eating up large chunks of salary-cap space, and which players look like bargains. We can then see how much the 49ers could conceivably have to work with this offseason.

A quick terminology note before we continue. A player’s salary is split into a couple of sections:

“Base salary” is what a player is scheduled to make in 2015 and is generally not guaranteed. That means a player can be cut and that money saved.

“Prorated bonuses” refer to money received earlier, but spread out over multiple seasons for salary-cap purposes. Normally, this comes in the form of a signing bonus. This money will continue to count against the cap even if the player is cut.

“Other bonuses” include roster guarantees and workout bonuses. For example, Colin Kaepernick will receive $125,000 per game he’s on the active roster for 2015. That money only becomes guaranteed when the games actually happen, so if he was cut, say, before the third game of the year, the 49ers would save the $1.75 million they otherwise would have had to pay him.

Quarterbacks

Tony Avelar/Associated Press

Quarterbacks Player Base Prorated Other Cap Hit Dead Cap Colin Kaepernick $10,400,000 $2,465,753 $2,400,000 $15,265,754 $9,863,013 Total $10,400,000 $2,465,753 $2,400,000 $15,265,754 $9,863,013 Over The Cap

Free agents: Blaine Gabbert, Josh Johnson

That’s right, the 49ers currently only have one quarterback under contract going into 2015. It would be somewhat overly optimistic to simply count on Kaepernick to stay healthy for all of 2015, so the 49ers will have to add at least one player to the roster—likely a veteran free agent and a prospect in the draft.

Kaepernick’s contract is such that it would be very difficult to part from him this season even if the 49ers wanted to. However, next season the 49ers could save as much as $9.4 million by moving on from Kaepernick. That makes 2015 very much a make-or-break season for him; he needs to start performing like a top-10 quarterback to justify making top-10 quarterback money.

Kaepernick is already going to eat up a higher percentage of the 2015 cap than he did of 2014; another subpar season could be his last.

Running Backs

Don Feria/Getty Images

Running Backs Player Base Prorated Other Cap Hit Dead Cap Bruce Miller $1,100,000 $446,500 $200,000 $1,746,500 $1,339,500 Carlos Hyde $537,749 $249,496 $50,000 $836,745 $1,285,537 Kendall Hunter $660,000 $50,000 $25,000 $735,000 $50,000 Trey Millard $510,000 $11,787 $0 $521,787 $35,361 Kendall Gaskins $435,000 $0 $0 $435,000 $0 TOTAL $3,242,749 $757,683 $275,000 $4,275,032 $2,710,398 Over the Cap

Free agents: Frank Gore, Alfonso Smith, Phillip Tanner

The 49ers will be getting Kendall Hunter back following his torn ACL last season, but they still likely want to add another body to the backfield here for depth behind the oft-injured Hunter and second-year runner Carlos Hyde. Frank Gore’s cap hit was a massive $6.45 million last season, and there’s just no way the 49ers could afford to bring him back for that number.

If they could get Gore back on a much smaller deal, then the 49ers would likely welcome him back with open arms. Otherwise, they could use a late-round draft pick or try to pick up a free agent on the cheap to fill out the roster.

The only potential cash savings here would be cutting Hunter to save just under $700,000 against the cap, but that’s highly unlikely.

Wide Receivers

Brian Bahr/Getty Images

Wide Receivers Player Base Prorated Other Cap Hit Dead Cap Anquan Boldin $5,500,000 $909,000 $500,000 $6,909,000 $3,636,000 Stevie Johnson $5,500,000 $0 $525,000 $6,025,000 $0 Quinton Patton $585,000 $97,875 $0 $682,875 $195,750 Trindon Holliday $660,000 $0 $0 $660,000 $0 Bruce Ellington $510,000 $118,607 $0 $628,607 $355,281 Lance Lewis $510,000 $0 $0 $510,000 $0 Chuck Jacobs $435,000 $0 $0 $435,000 $0 TOTAL $13,700,000 $1,125,482 $1,025,000 $15,850,482 $4,187,031 Over the Cap

Free agents: Michael Crabtree, Brandon Lloyd, Kassim Osgood

Our first major money-saving cut is Stevie Johnson. Johnson is scheduled to count for more than $6 million against the cap this season, but absolutely none of that is guaranteed—the 49ers could cut him and walk away scot-free.

Now, simply cutting him isn’t a great idea. He’s the second-most experienced receiver on the roster, has been a starter before and is the logical short-term replacement for Michael Crabtree while the young receivers continue to develop. However, $6 million is a lot for a player who missed half of last season.

The front office could restructure Johnson’s deal, shifting some of his non-guaranteed money into future guaranteed money to reduce his cap hit for 2015. That’s a bit like mortgaging the future to pay for the present, however, and that’s not necessarily a good plan.

Management could also hold the idea that the 49ers would go with a rotation of Anquan Boldin, Bruce Ellington, Quinton Patton, a first-round rookie and/or a cheap free agent over Johnson’s head and essentially force him to take a pay cut if he wants to stay around.

They could basically give Johnson an ultimatum: We’re going to pay $3.5 million or so for our second receiver this season; it could be you, or it could be someone like Miles Austin or Denarius Moore.

If Johnson’s cap hit can't be lowered, I think he'll be released in order to pick a more inviting, cheaper free-agent target. The upshot is the 49ers could save something in the $2.5 million range in 2015 by renegotiating with or outright replacing Johnson.

Trindon Holliday is another potential cap casualty, but not a particularly significant one, as he’d save San Francisco only $660,000. He’s more likely to be replaced by finding a better player for his cap value.

Tight End

Jonathan Bachman/Associated Press

Tight Ends Player Base Prorated Other Cap Hit Dead Cap Vernon Davis $4,350,000 $2,067,920 $600,000 $6,967,920 $2,067,920 Vance McDonald $632,198 $249,396 $100,000 $981,594 $498,792 Derek Carrier $585,000 $0 $0 $585,000 $0 Asante Cleveland $510,000 $0 $0 $510,000 $0 Xavier Grimble $435,000 $0 $0 $435,000 $0 TOTAL $13,700,000 $1,125,482 $1,025,000 $15,850,482 $4,187,031 Over the Cap

Free agent: Garrett Celek

Vernon Davis was not worth more than $7 million against the cap last season. Players making 10 times less than Davis performed much better, making Davis’ contract an interesting one to cut.

The hard part about cutting Davis is that he was performing at a very high level just a few years ago. Davis was a Pro Bowler as recently as 2013, and has been a solid performer for years. Last year, however, was a total disaster, so the 49ers need to decide whether 2014 was a bizarre outlier or the first signs of a total decline.

Cutting Davis would save the 49ers $4.9 million against the salary cap. If the 49ers were in a better cap situation, I’d say they should sit and wait to see how Davis performs in 2015. However, with the salary-cap situation being as tight as it is, that’s $4.9 million that could be put to better use in a lot of places.

An alternative to outright cutting Davis would be trying to trade him to Washington. Washington recently hired Scot McCloughan as their general manager, and it was under his guidance that the 49ers drafted Davis back in 2006. Trading Davis would save the 49ers the same amount of cap space, and perhaps get the team an extra sixth- or seventh-round draft pick out of the deal.

Otherwise, I’d say cut Davis if or when the 49ers want to make a move in free agency. If it’s between Davis and, say, re-signing Chris Culliver, I’d rather see Davis gone.

Derek Carrier is another potential player who may get cut due to his $585,000 cap hit if the 49ers find an interesting tight end late in the draft, though I find it unlikely as well.

Offensive Line

Marcio Jose Sanchez/Associated Press

Offensive Line Player Base Prorated Other Cap Hit Dead Cap Joe Staley $4,500,000 $1,200,000 $700,000 $6,400,000 $6,000,000 Anthony Davis $1,850,000 $3,336,670 $1,000,000 $5,654,170 $6,366,670 Alex Boone $3,400,000 $340,000 $50,000 $3,740,000 $340,000 Daniel Kilgore $800,000 $337,500 $800,000 $1,875,000 $1,012,500 Jonathan Martin $1,042,400 $0 $0 $1,042,400 $0 Joe Looney $660,000 $106,301 $0 $766,301 $106,301 Marcus Martin $525,000 $167,813 $20,000 $712,813 $503,439 Brandon Thomas $510,000 $126,504 $0 $636,504 $379,512 Dillon Farrell $510,000 $1,666 $0 $511,666 $3,334 Andrew Tiller $510,000 $0 $0 $510,000 $0 Fouimalo Fonoti $435,000 $1,666 $0 $436,666 $3,334 Chris Martin $435,000 $0 $0 $435,000 $0 TOTAL $15,177,400 $5,618,120 $2,620,000 $23,415,520 $14,715,090 Over the Cap

Free agent: Mike Iupati

Jonathan Martin was fairly terrible after being forced into the starting lineup last season. Cutting him would save the 49ers more than $1 million against the salary cap, with no cap penalty whatsoever. His performance could easily be duplicated by a rookie or veteran’s-minimum free agent. He’s probably gone.

A more interesting situation is Alex Boone. Boone’s contract expires after this season, and he’s played well enough to earn an extension—especially considering that the 49ers likely can't afford to re-sign Mike Iupati. While the 49ers have players in place to potentially replace one guard—with Brandon Thomas, Joe Looney, Marcus Martin and Daniel Kilgore on the roster—losing both players would be a difficult situation to recover from.

You can’t just magically make an extension happen, of course; Boone would have to agree to a new deal. The 49ers reportedly offered him a new extension during the offseason, but Boone turned it down, according to Sportsnaut's Vincent Frank. With the coaching staff in flux, who knows if Boone will want to stay beyond 2015.

An extension would reduce Boone’s cap hit in 2015 significantly. Similar contracts for other mid-to-top guards around the league would imply somewhere between $1 to 1.5 million in savings if the 49ers and Boone could come to an agreement on an extension. It’s iffy whether or not that will get done, however.

Joe Looney is another potential bottom-of-the-roster cap casualty, but at a certain point, the 49ers need some experienced depth, so it’s unlikely that he is released. Watch out for a cut if he fails to win a starting spot, however.

Defensive Line

Marcio Jose Sanchez/Associated Press

Defensive Line Player Base Prorated Other Cap Hit Dead Cap Justin Smith $2,650,000 $2,186,668 $1,600,000 $6,436,668 $2,186,668 Glenn Dorsey $1,500,000 $691,666 $350,000 $2,341,666 $1,383,334 Ian Williams $1,000,000 $333,334 $250,000 $1,495,834 $333,334 Tank Carradine $804,789 $494,578 $50,000 $1,349,367 $989,156 Corey Lemonier $595,000 $135,880 $0 $730,880 $271,760 Quinton Dial $585,000 $45,413 $0 $640,413 $90,826 Kaleb Ramsey $510,000 $12,050 $0 $552,050 $36,150 Lawrence Okoye $435,000 $9,202 $0 $444,202 $68,405 Garrison Smith $435,000 $0 $0 $435,000 $0 Mike Purcell $435,000 $0 $0 $435,000 $0 TOTAL $15,177,400 $5,618,120 $2,620,000 $23,415,520 $14,715,090 Over the Cap

Free Agents: Tony Jerod-Eddie

Will Justin Smith retire or not? That’s the $4.25 million dollar question on everyone’s minds this offseason.

The defensive end will be turning 36 in September, and was already the oldest regularly-starting defensive lineman in football last season. Considering that 2014 might have been his most frustrating season as a 49er, he may decide to ride off into the sunset and await his Hall of Fame deliberation in five years.

On the other hand, Justin Smith’s declining golden years are still better than three-quarters of the league. Smith is still a premier run-stopping defensive end, and the 49ers don’t have an obvious replacement for both him and the departed Ray McDonald—Tank Carradine would logically step into one of the starting roles, but that still leaves a position unfilled.

Smith would also get to play another season for his longtime position coach, Jim Tomsula. That might inspire Smith to come back one more time to finish out his contract. Smith hasn’t said anything either way yet, so the franchise remains in limbo while they await news.

Ian Williams’ cap number is also an interesting target for an extension. The problem there is that Williams doesn’t have very much base salary to shift into a signing bonus, meaning that any extension would likely add to his contract value in 2015 rather than lower it. The front office might be able to scrape $150,000 or so off of the salary cap with a new deal for Williams, but nothing significant.

Linebackers

Ben Margot/Associated Press

Linebackers Player Base Prorated Other Cap Hit Dead Cap Aldon Smith $9,754,000 $0 $0 $9,754,000 $0 Patrick Willis $7,065,000 $421,750 $781,250 $8,268,000 $843,500 NaVorro Bowman $4,700,000 $2,954,000 $750,000 $7,654,000 $8,016,000 Ahmad Brooks $6,000,000 $2,348,750 $1,300,000 $7,055,000 $5,546,250 Chris Borland $530,000 $154,359 $10,000 $694,359 $436,077 Nick Moody $585,000 $26,918 $0 $611,918 $53,836 Aaron Lynch $510,000 $49,500 $0 $559,500 $148,500 Chase Thomas $510,000 $0 $0 $510,000 $0 Shayne Skov $435,000 $0 $0 $435,000 $0 TOTAL $30,089,000 $5,955,277 $2,841,250 $38,885,527 $15,044,163 Over the Cap

Free agents: Dan Skuta, Michael Wilhoite, Desmond Bishop

All offseason long, I had been pointing to Ahmad Brooks as a potential salary-cap casualty, and he may still be one. However, a de-escalator clause saw his 2015 base salary drop by $2.5 million, according to Jason Hurley of Niners Nation.

If that’s true, Brooks’ new cap hit of $7.06 million is a lot easier to swallow than the previous $9.65 million. He still may be a salary-cap casualty, giving the 49ers $1.5 million in additional cap room, but it’s far less of a certainty now.

What is a certainty is that Aldon Smith’s cap hit is enormous. Smith’s on the fifth-year option deal from his rookie contract, giving him the equivalent of the transition tag.

That number is entirely unguaranteed, meaning the 49ers could tear it up and offer Smith a new contract. It would presumably be a long-term deal, with notable de-escalators and opt-out clauses if Smith gets suspended again. It would give Smith long-term flexibility and give the 49ers protection in case he gets in trouble once more.

There’s no guarantee that the two sides will come to an agreement before the season, of course, but if they did, that could save the 49ers millions against the cap. A quick, back-of-the envelope calculation comparing Smith's deal to new contracts signed by top outside linebackers would put 2015’s savings somewhere around $4.5 million. It definitely makes sense to at least try to come to some sort of deal there.

The other contract worth tackling here is Patrick Willis'. Willis is signed through the 2016 season at the moment, and has almost no guaranteed money on his deal. The 49ers do have Chris Borland behind him ready to step in when Willis finally slows down, but we’re not at that point yet—Willis only turned 30 in January. He could be due for one final extension, ensuring he’d end his prime years with the team.

Willis has shown a willingness to restructure his contract before—he did so in 2013, for example. By cranking Willis’ base salary down to the veteran’s minimum of $870,000 and converting money into a signing bonus over another, say, four years, the 49ers could get another $3.5 million or so under the cap for 2015.

Nick Moody is another possible bottom-of-the-roster casualty if the 49ers re-sign Dan Skuta.

Defensive Backs

Tony Avelar/Associated Press

Defensive Backs Player Base Prorated Other Cap Hit Dead Cap Antoine Bethea $3,000,000 $1,250,000 $500,000 $4,750,000 $3,750,000 Tramaine Brock $1,850,000 $750,000 $450,000 $2,790,000 $2,250,000 Eric Reid $1,175,978 $1,136,955 $0 $2,312,933 $5,011,355 Craig Dahl $1,400,000 $233,334 $300,000 $1,933,334 $223,334 Jimmie Ward $743,297 $873,187 $0 $1,616,484 $4,429,452 Dontae Johnson $510,000 $100,136 $0 $610,136 $300,408 Leon McFadden $585,000 $0 $0 $585,000 $0 Keith Reaser $510,000 $41,200 $0 $551,200 $123,600 L.J. McCray $510,000 $2,000 $0 $512,000 $4,000 Marcus Cromartie $510,000 $0 $0 $510,000 $0 Kenneth Acker $435,000 $30,150 $0 $465,150 $90,450 Cameron Fuller $435,000 $0 $0 $435,000 $0 TOTAL $11,664,275 $5,059,112 $1,250,000 $17,973,387 $16,192,599 Over the Cap

Free agents: Chris Culliver, Perrish Cox, Chris Cook, Raymond Ventrone

Craig Dahl was, at best, the seventh defensive back for the 49ers last season, and that’s not something you can spend nearly $2 million on. Dahl was the 49ers’ most-used special teamer, which does give him plenty of value, but that’s still far too much money to be spending on a coverage unit player. I find it highly unlikely he’s on the team in 2015.

Other than that, most of the defensive backs on the roster have worthy contracts. I could see Leon McFadden getting bumped off the bottom for a cheaper rookie, but there’s no other major money-saving possibilities here. If anything, the amount of money paid to cornerbacks is going to increase, as Chris Culliver is the top free agent that the 49ers have a realistic chance to re-sign in 2015.

Special Teams

Marcio Jose Sanchez/Associated Press

Special Teams Player Base Prorated Other Cap Hit Dead Cap Phil Dawson $3,134,000 $1,000,000 $0 $4,134,000 $1,000,000 Andy Lee $2,050,000 $500,000 $0 $2,550,000 $1,000,000 TOTAL $5,184,000 $1,500,000 $0 $6,684,000 $2,000,000 Over the Cap

Free agent: Kyle Nelson

Both Phil Dawson and Andy Lee are among the best at what they do in the NFL, but both are also among the highest-paid players at their respective positions. Would the difference between Dawson and an average-contract kicker like Shayne Graham really be worth more than $2.8 million a year? Is Lee worth $1 million more per season than Dave Zastudil?

I don’t see either player simply being dumped to the curb, because they are among the best at what they do—particularly Lee, who has been a top-10 punter for essentially his entire career. Still, if the 49ers find themselves a couple of million sort of signing an impact receiver or defensive lineman, that might be a tradeoff they’re willing to make.

The 49ers also need to sign a long snapper, but that won’t have a significant impact on the salary-cap situation.

Overall

If you add up all the possible cuts, restructures and extensions I’ve laid out throughout this article, make some positive assumptions on the sorts of deals the 49ers would be able to make and assume a very proactive staff, the 49ers could end up more than $25 million under the salary cap—even after signing their rookies. That would be more than enough to re-sign Culliver, Gore, Cox and Skuta, and even keep them in the running for Iupati if they so choose.

If you take a more pessimistic tack and assume that no one will want to redo their contracts with a team being led by a new coaching staff, you’re left with just the players the 49ers could cut—players like Jonathan Martin, Stevie Johnson, Vernon Davis, Craig Dahl and Ahmad Brooks. That would give the 49ers a little under $10 million in cap space after signing rookies—certainly nothing to sneeze at, but not enough to do anything major in free agency.

Somewhere between $15 and $20 million seems like a more likely compromise. The 49ers will rework some, but not all of the contracts, and they'll release some, but not all of the potential cap casualties. This will give them enough to do some minor patching of holes in free agency, but not go overboard. That’s the price you pay for having a lot of solid veterans locked up long-term.

All contract values come from OverTheCap.com.

Bryan Knowles is a featured columnist for Bleacher Report, covering the San Francisco 49ers. Follow him @BryKno on twitter.