“By any measure, the de Blasio administration has blown this out of the water,” said Alicia Glen, the deputy mayor for housing and economic development. “We’re ahead of schedule and slightly under budget.”

Affordable for whom, of course, remains a question. Some housing activists have complained that the administration has not done enough to create homes for the poorest New Yorkers, focusing instead on moderate-income residents.

But according to the city’s housing commissioner, Vicki Been, one-quarter of the affordable units created during Mr. de Blasio’s administration are reserved for tenants making less than $31,100 for an individual and $40,800 for a family of three; of those, half are for tenants who earn less than $19,050 for an individual or $24,500 for a family of three.

Nearly a quarter of affordable apartments preserved with city financing last year were in two Manhattan projects, both devoted to middle-class tenants: Stuyvesant Town-Peter Cooper Village, on the East Side between 14th and 23rd Streets, and the Riverton Houses, in East Harlem.