It won’t work for less predictable practice areas, but real estate lawyers at K&L Gates have an unconventional model for billing: An algorithm that prices each element of a deal to avoid sticker shock in a slowing market.

Critics say up-front pricing is risky in a sector where tough negotiations, permit hurdles, municipal demands and unexpected barriers to complex deals could leave the firm on the losing end of such arrangements. But K&L’s goal is simple: Avoid situations where cost-conscious clients balk at their bill.