It pays less and less to buy and flip a home these days. From April through June, the typical home flipped by an investor resulted in a 25.1% return on investment, before expenses. That’s the lowest profit margin for such transactions since 2008, according to an analysis by Attom, a real estate data company.

Gross profits — the difference between what an investor paid for a property and what it sold for — fell 13.6% in the second quarter from a year earlier to $65,300, the firm said. Attom’s analysis defines a flipped home as a property that sells within 12 months of the last time it sold.

Home flippers buy a home, typically with cash, then pay for any repairs or upgrades needed to spruce up the property before putting it back on the market.

The shrinking profitability for home flipping is largely due to home prices, which continue to climb nationally, albeit at a slower pace, driving up acquisition costs for investors.

“We’re seeing very low profit margins from home flipping because of the historically high cost of homes,” said Rob Barber, Attom’s CEO. “The initial buy-in for properties that are ideal for flipping, often lower priced homes that may need some work, keeps going up.”