Housing construction in California is lagging so badly, it would take some towns and cities centuries at their current construction pace to meet state goals to build homes for low- and middle-income families, according to a new analysis.

But in some Bay Area cities, new construction for high earners is way ahead of schedule.

The analysis comes at the mid-point of the state’s eight-year planning cycle, known as the Regional Housing Need Allocation or RHNA, and shows municipalities are just one-quarter of the way toward meeting their state-mandated goals in the midst of a long-running housing shortage. And, housing advocates argue, those goals are artificially low and subject to political pressure.

“This is troublesome,” said Noel Perry, founder of Next 10, a nonpartisan think tank. “It reveals how little is being done to alleviate the crisis.”

Even with modest goals, several cities are floundering. At the current rate of construction, the cities of Santa Clara and Cupertino won’t hit their targets for building very low and low-income housing for at least another 500 years, according to the analysis.

Menlo Park has built 1 of the 143 moderate income homes allotted, setting a pace for completion in 2444. Similar goals for middle-class housing in Mountain View are on track for completion after 2500.

The study found San Jose would meet low-income targets no sooner than 2048, Oakland by 2032, and San Francisco by 2030.

Yet all these cities are expected to meet housing goals for high income households this year.

Since 1969, the state has required towns, cities and counties to develop plans for long-term residential growth in 5- and 8-year cycles. The state through RHNA assigns goals for the number of housing units a jurisdiction should have built for a range of family income levels.

Report co-author Adam Fowler of Beacon Economics said recent changes to state law have allowed researchers to get a better look at how cities are performing. Researchers analyzed RHNA (pronounced ree-na), for the state’s 539 municipalities and found several Bay Area governments slipping far behind construction goals to be met by 2023.

Even though cities already are far behind in residential construction, Fowler said the state goals are set too low and often subject to political influence. The state targets fail to reflect job and population growth, and too often assume wealthy cities will add few new residents — despite tech and service incomes soaring in the Bay Area.

The state targets also doesn’t count housing backlogs created in previous planning cycles. “When the bar of success is so low, the RHNA targets themselves must be re-evaluated,” the report said.

Cupertino Mayor Steven Scharf wrote in February that his city has approved several projects totaling about 1,400 homes and apartments, but developers have completed just 19 units. Scharf called it “unacceptable” and said the city wants to have a healthy ratio of new housing to jobs. Housing advocates have criticized Cupertino for failing to build enough homes and apartments and for the long-running fight that has delayed development of the former Vallco Shopping Mall site.

Jason Rhine, a lobbyist with the League of California Cities, said many municipalities are open to changes in the planning process. “We would certainly be open to tinkering with RHNA,” he said.

But Rhine also noted that cities can only approve construction projects, not build them. “At the end of the day,” he said, “developers develop.”

Many other California cities have such sluggish paces constructing affordable housing — heavily dependent on subsidies from government and nonprofit institutions — that they’ll likely never meet state goals.

But major metros aren’t the only regions falling behind their planning needs. About 100 jurisdictions, mostly in low income areas, failed to even submit required annual reports to the state since at least 2014.

Perry and Fowler believe the state needs to enforce consequences on the municipalities that fall behind or ignore state mandates. Gov. Gavin Newsom sued Huntington Beach in January for failing to meet its responsibilities to build more housing.