How much will Bank of America’s expected $17 billion mortgage settlement cost the company? The answer is, almost certainly not that much.

In mega-settlements negotiated with the government, a dollar is rarely worth an actual dollar.

Inflated figures make sensational headlines for the Justice Department, and $17 billion would be the largest settlement by far arising from the economic meltdown in which millions of people in the United States lost their homes to foreclosure. But the true cost to companies is often obscured by potential tax deductions and opaque accounting techniques.

The expected Bank of America settlement will resolve allegations that the bank and companies it later bought misrepresented the quality of loans they sold to investors. Most of the problem loans were sold by Merill Lynch and Countrywide Financial before Bank of America bought them during the 2008 financial crisis. To settle the government’s claims against the three companies, Bank of America will pay $9.65 billion in cash and provide consumer relief valued at $7 billion, according to officials who spoke on condition of anonymity because the deal isn’t scheduled to be announced until Thursday at the earliest.

Bank of America declined comment on any settlement-related topics Wednesday.

Whether cash payments are structured as penalties or legal settlements can determine whether targeted companies can declare them as tax-deductible business expenses. Also, consumer relief is an amorphous cost category: If Bank of America’s deal resembles the department’s previous settlements with JPMorgan and Citigroup, that part could be less costly to the company than the huge figures suggest.

Some of the relief will, in fact, come in the form of cash donated to community organizations or, in Citi’s case, lending money to affordable housing projects at below-market rates. But much of the relief will come from modifying loans that the banks have already concluded could not be recovered in full. Reducing the principal on troubled loans often just brings the amount that borrowers owe in line with what the banks already know the loan to be worth.

Settlement math also affects the actual cost of the deals, allowing banks to earn a multiple for each dollar spent on certain forms of relief. Under Citi’s deal, for example, each dollar spent on legal aid counselors is worth $2 in credits, and paper losses on some affordable housing project loans can be credited at as much as four times their actual value.

How much the total package of cash and non-cash borrower aid is worth is impossible for outside observers to say.

“Companies that have reached for these settlements have not taken an explicit charge for it,” said Moshe Orenbuch, a banking stock analyst for Credit Suisse who has debated how to value noncash settlements with clients.

In discussing the deals with analysts, the banks “always say, ‘just remember, there’s the piece that’s cash and the piece that’s not cash.’ In general terms, they’re suggesting that the relief is stuff they’re doing anyway.”

Beyond the bonus credits, the lengthy durations of the deals mean banks can accrue some of the credits they need simply by running business as usual.

JPMorgan, for example, must provide roughly $2 billion of principal reductions to homeowners before the end of 2017. That is one-fifth the $10 billion that the bank forgave between 2009 and 2012, according to its annual social responsibility reports.

Even before its settlement with the Justice Department, the bank had committed itself to continuing the same principal reduction programs.

Both the department and the banks declined comment.

Consumer advocates said settlement amounts can obscure the actual costs at stake. But since the disputed business behaviors affected mortgage investors, not mortgage borrowers directly, they welcome any consumer aid.

“This is public policy making through settlements that aren’t even related to the nature of the lawsuit,” says Ira Rheingold, executive director of the National Association of Consumer Advocates. “But there’s no other tool available for people who are concerned about poor communities right now.”

In the deal with JPMorgan in November, the department had a clear message for homeowners: Billions of dollars’ worth of help was coming. Attorney General Eric Holder at the time described the appointment of an independent monitor who would distribute $4 billion set aside for homeowner relief.

The actual relief is more complicated than cash handouts, however.

Both Citigroup and JPMorgan earn credits under the settlement from a “menu” of different consumer-friendly activities, according to settlement documents. The options are effectively an update of the consumer relief previously provided through the national mortgage servicing settlement, a 2012 deal between state attorneys general and the major banks.

JPMorgan probably will earn its $4 billion in credits under the settlement through a total of $4.65 billion of activities that qualified as relief, according to a report by Enterprise Community Partners, a nonprofit run by executives from low-income housing groups and major banks.

More than half will come from principal reductions, with the rest earned through actions such as writing new loans in distressed areas, donating foreclosed properties to community groups and temporarily suspending payments on some loans.

The report described the settlement as “a reasonable model from a consumer perspective.” But one of its authors, Andrew Jakobovics, acknowledged that many of JPMorgan’s credits probably will come from activities that are part of its regular business practices. The bank has announced plans to complete its obligations at least one year ahead of schedule.

Citigroup’s settlement gives it until the end of 2018 to earn $2.5 billion in credits. It must provide half its $825 million in principal reduction credits in neighborhoods designated as “hardest hit” by the Department of Housing and Urban Development because of high concentrations of foreclosures and vacant properties.

It also can earn credit by waiving some closing costs on new loans to low-income home buyers and forgiving principal on loans where the bank began a foreclosure but never completed it.

“Will it cost them money? No,” said Rheingold, who said he supports the settlements. “But would they have done it otherwise? No.”