KB Home Inc. late Wednesday beat Wall Street expectations for its second quarter, but said that its sales pace slackened as buyers faced higher mortgage interest rates and inflation.

The homebuilder KBH, +2.42% said it earned $211 million, or $2.32 a share, in the quarter, compared with $143 million, or $1.50 a share, in the year-ago quarter.

Revenue rose 19% to $1.72 billion, with the average selling price of its new homes up 21% year-on-year to $494,300, the company said.

FactSet consensus called for earnings of $2.04 a share on sales of $1.65 billion. The stock rose more than 3% in the extended session Wednesday, after ending the regular trading day up 2.4%.

“Sales rates are moderating from the exceptional levels the industry has experienced, as buyers process the impact of higher mortgage interest rates, as well as inflationary pressures,” Chief Executive Jeffrey Mezger said in a statement.

KB Home’s flexible “built-to-order” model, with several floorplans and prices to choose from, will help it navigate the “changing market conditions,” he said.

The company also promised to remain “strategic” in allocating its capital, and said that it owns or controls all the lots it needs to support new-home delivery targets through 2024.

“As a result, we are in a favorable position to calibrate our land investments to evolving conditions, without compromising our mid-term growth, providing us with opportunities to redeploy capital to stockholders,” Mezger said.

KB Home guided for revenue from housing between $7.3 billion and $7.5 billion in fiscal 2022, with the average selling price rising to about $500,000.