When home prices soared seven years ago, longtime friends Sergey Yershov and Roman Zolin purchased a house together in the District because they could not afford to each buy one on their own — at least not close to the D.C. firm where they worked.

But then Zolin got married, Yershov got engaged and they decided to sell in 2009. The idea of coughing up thousands of dollars for real estate agent commissions did not faze them initially. But after six months and no offers, they reassessed. They took their home off the market, sunk $30,000 into renovations and tried again in the spring of last year — this time on their own.

“The commission sounded like a lot of money lost,” Yershov said. “We weren’t looking to make a huge profit, but we wanted a return on the money we invested doing the renovations. We talked and decided we would not use a real estate agent.”

“But the results were not quite what we expected,” Zolin said.

Counting each dollar

It’s not unusual for homeowners to scrutinize the value that a real estate agent adds when it’s time to sell. The commission, which typically comes out of the seller’s pocket to pay agents on both sides of a deal, is often a touchy issue, especially if attractive offers don’t materialize.

The math can be particularly tricky for people whose home values have eroded. Many have to dig into their savings to pay the sales commission because they do not have enough equity in their homes to cover the cost. Even in the Washington region, one of the few areas where prices are rising, many borrowers are “underwater.” In Maryland, 24 percent of the state’s borrowers owed more on their mortgages than their homes were worth in the first quarter of this year, according to mortgage research firm CoreLogic. In Virginia and the District, 23 percent and 15 percent, respectively, were underwater.

Against that backdrop, real estate commissions must be tumbling, right?

Wrong. As the housing market has soured, the average commission has been climbing, according to Real Trends, an industry publication that polls hundreds of brokerages on the topic and publishes the aggregate number. The average commission jumped from a low of 5.02 percent in 2005 to 5.40 percent last year.

In a nutshell, there are fewer agents working to sell homes — and they’re working much harder than they did during the boom days, when homes practically sold themselves overnight, said Steve Murray, president of Real Trends.

“During the boom, competition among agents drove commission rates down,” Murray said. “Now, agents are putting more time and money into marketing these homes, and they’re not as willing to compete with each other by lowering commissions.”

Locally, commissions also have been climbing, said Jeffrey Detwiler, president and chief operating officer of Long & Foster Cos., the Washington area’s largest real estate brokerage.

“The lowest commission rates were in a marketplace where buyers and sellers were coming together on their own and the agent’s job was to line up orders and show products,” Detwiler said. Today, “it’s about creating confidence that the price is right. There’s never been such a discrepancy between where buyers think they should be buying and where sellers think they should be selling. The Realtor’s job is to bring both sides together.”

Between all and nothing

Ultimately, Yershov and Zolin reached a similar conclusion. The for-sale-by-owner route was tough, they said.

Many firms offer deeply discounted but limited services to such sellers. Some, such as Redfin, are Web-based rebaters that keep their costs down by doing as little of the legwork as possible and then giving their customers a portion of the commission that the company receives. Others, such as Save6 in Maryland, will charge customers a flat fee to post a listing on the multiple-listing service.

The flat-fee model appealed to Yershov and Zolin. For about $400, they received yard signs and the paperwork needed to complete a sale in addition to having their home posted on the multiple-listing service. They created a Web site with photos to market the house.

“Very, very few people showed up,” Zolin said. “It seemed like very few agents wanted to show the property.”

After about three months, Zolin and Yershov caved and hired another agent.

Real estate agents say they have good reason to avoid for-sale-by-owner homes. For starters, they say sellers who go it alone are usually unfamiliar with the mechanics of negotiating the complex transaction and they end up leaning heavily on the buyer’s agent.

“You end up doing the work that the seller should be paying their agent to do,” said Joan Caton Cromwell, an agent at McEnearney Associates in the District. “Also, the sellers are emotionally involved with the property and they all think their house is the best house on the block, even when it’s not. That makes it very difficult for them to come to grips with the value of the home.”

Another reason agents may stay away: low-ball commissions.

“There’s really no motivation for a Realtor to show a home if the seller is only offering 1 percent or 1.5 percent commission” to the buyer’s agent, said Larry Lessin, owner of Save6. “From a practical point of view, if you want to get the most traffic, you have to offer at least 2.5 percent.”

Traditionally, sellers are the ones who pay commissions to the brokers who work for them. Those brokers keep a portion of the money and pay an agreed-upon share, typically as much as half of the total commission, to the brokers who work for the buyer. Each brokerage then compensates its respective real estate agents involved in the deal.

Still, sellers can haggle over those rates. Why should the buyer care? Because the commission is folded into the selling price.

Whatever the commission, the real estate industry’s code of ethics states that agents who work with potential buyers have an obligation to show properties that match the buyers’ criteria regardless of the commission offered, said Jonathan Hill, president of RealEstate Business Intelligence, a subsidiary of the local multiple-listing service.

“The agent shouldn’t pick and choose based on what the agent wants,” Hill said.

Those who do are likely to find themselves in an awkward situation now that many house hunters search listings on the Web, Hill said. “The buyer will see a house that they’re interested in, wave it under the Realtor’s nose and say, ‘Why didn’t you show me this?’ ”

Still, buyers should ask some basic questions of their agents. The Federal Trade Commission suggests a few: What is the commission you are interested in? Will you show me homes that offer lower commission rates?

Sellers should also consider various scenarios when negotiating the commission, said Patrick Roach, an FTC attorney. For instance, what if the seller agrees to evenly split a 6 percent commission between two brokerages but the ultimate buyer has no agent? Should those savings go to the seller?

“Is the listing agent’s fee going to go from 3 percent to 6 percent?” Roach said. “It’s something for sellers to think about.”

The bottom line

In retrospect, Yershov and Zolin concluded that the asking price — not the commission — was the issue they should have focused on from the start.

They originally asked for $785,000 because a similar house a few doors down had sold for that much. When they hired Long & Foster agents Meredith Margolis and Molly Peter in July 2010, the agents told them that neighboring house had a more impressive kitchen. The agents also told them that the sellers kicked in money toward closing costs, which means they netted less than $785,000, she said.

Upon their agents’ advice, Yershov and Zolin slashed their asking price to $749,000. Their agents then went on to stage the home, creating two seating areas and a television space to make the house more attractive to families with children. They revamped the marketing materials and held open houses — something Yershov and Zolin had not done.

“Lo and behold, we got two offers,” Margolis said. “But they were tire kickers, to be honest. Both buyers would not go up in price.”

In December, Margolis advised the owners to pull the house off the market and set their sights on spring. In March, the home was relisted. Within two weeks they received three offers, and two were above asking price.

The home sold for $754,000 in March.

The 5 percent commission—$37,700 — was split evenly between the brokerages involved.