The stock of Zillow, operator of the largest real-estate information website, dropped the most in three months after the Seattle company reported a second-quarter loss on higher costs tied to advertising and acquisition-related compensation.

Zillow shares fell $6.98, or 7.7 percent, to $83.73 Wednesday. The shares have more than tripled this year, compared with a 19 percent gain for the Standard & Poor’s 500 index.

The net loss for the period ended June 30 was $10.2 million, or 30 cents a share, compared with a profit a year earlier, Zillow said in a statement Tuesday.

Excluding share-based compensation expenses, the company posted a profit of 1 cent, beating the average analysts’ forecast for a loss of 11 cents, according to data compiled by Bloomberg.

Unlimited Digital Access. $1 for 4 weeks.

Zillow faces increased competition from Trulia and other providers of real-estate listings amid a housing-market recovery. Zillow has bought other companies to maintain growth and is spending cash to diversify its products.

“They’re investing more aggressively in sales and brand advertising,” said Aaron Kessler, an analyst at Raymond James & Associates in San Francisco. “That’s partially holding back better margins in the near-term, but these should improve going forward.”

Revenue climbed 69 percent to $46.9 million, compared with analysts’ prediction for $44.4 million on average.

Zillow is forecasting sales of $186 million to $188 million this year, up from the previous outlook for $178 million to $182 million, Chief Financial Officer Chad Cohen said on a conference call Tuesday.

The number of people visiting Zillow via its website and mobile devices reached a record 61 million unique users in July, up 66 percent from a year earlier, the company said.

Q&A with Obama

Zillow CEO Spencer Rascoff hosted an online question-and-answer session Wednesday with President Obama on responsible homeownership.

Obama called for private capital to take the lead role in the mortgage market with the government continuing to provide a backstop only against catastrophic risk.

He also endorsed an approach to remake the housing-finance system as Fannie Mae and Freddie Mac are wound down.

“You can’t have a situation in which the government is underwriting and guaranteeing all the mortgage lending that’s taking place around the country and big profits are being made by these quasi-private institutions,” Obama said. Congress should pass housing legislation by the end of the year, he said.

Obama — who said federal programs have helped millions of homeowners save an average $3,000 by refinancing at lower rates — noted that he would save money by refinancing the mortgage on his Chicago home.

Obama is paying 5.625 percent interest on his 30-year mortgage on the home, worth between $500,000 and $1 million, according to financial-disclosure forms.

The average rate on the 30-year loan was 4.39 percent last week, according to mortgage buyer Freddie Mac.

“I would probably benefit from refinancing now. I would save some money,” Obama said. But he added: “When you’re president you have to be a little careful about these transactions, so we haven’t refinanced.”

Information from The Associated Press is included in this report.