Shares of Trulia Inc (NYSE:TRLA) climbed as much as 12% in early trading after it was announced that Zillow Inc (NASDAQ:Z) will officially buy Trulia—and that the previously reported amount has increased. Shares of Zillow slumped by as much as 5%.

Zillow

Zillow buys Trulia in stock deal

In a press release today, Zillow Inc (NASDAQ:Z) said it entered into a definitive agreement to buy Trulia Inc (NYSE:TRLA) for $3.5 billion. The deal is a stock for stock transaction, and the boards of directors of both online real estate companies have already approved it. The deal is expected to close next year.

Under the terms of the deal, Trulia shareholders receive .444 Zillow shares. In all, current Trulia shareholders will own about a third of the merged company when the deal closes. Class A and B Zillow shareholders will receive “one comparable share of the combined company” when the deal closes, representing about 67% of the merged company. The deal’s value is a 25% premium to Trulia’s Friday closing price.

The agreement will be subject to a number of closing conditions, like the expiration of antitrust waiting periods and also the approval of both companies’ shareholders. Rich Barton and Lloyd Frink, co-founders of Zillow Inc (NASDAQ:Z) and controllers of a majority of the company’s voting power, agreed to vote in favor of the deal. Trulia Inc (NYSE:TRLA)’s board members, who hold 7.4% of Trulia’s stock, have also agreed to vote for it.

What Zillow and Trulia hope to gain

Zillow Inc (NASDAQ:Z) said it will keep up the Trulia Inc (NYSE:TRLA) brand name along with its own. When the merger closes, current Trulia CEO Pete Flint will remain the company’s CEO and report to Zillow CEO Spencer Rascoff. He will also become a member of the combine company’s board of directors, as will another member of Trulia’s board.

In the press release, the company said it expects to be able to speed up innovation by combining its resources with those of Trulia. It also expects to see more access to free data about the real estate market, including analysis of housing trends and forecasts. Other expected perks include broader distribution, higher value and return on investment for advertisers, and cost savings. Zillow Inc (NASDAQ:Z) and Trulia Inc (NYSE:TRLA) expect to see cost synergies from improvements in operational efficiency by 2016. Management expects at least $100 million in annualized cost avoidances.