Figuring out which California cities and counties are doing the best — or worst — job of creating housing is no easy task, but a report issued Thursday by Beacon Economics makes an attempt.

The report grades each of California’s 539 cities and counties based on their progress toward meeting goals set out in the Regional Housing Needs Assessment. This is a statewide program that determines how much housing a local jurisdiction should create at four different income levels over a five- or eight-year cycle.

The grades are often surprising and illustrate some shortcomings of the assessment process.

“A lot of regions have high grades because they have very low housing targets relative to their population,” said Adam Fowler, Beacon’s research director. It also highlights how little progress the state as a whole is making.

In the Bay Area, five jurisdictions got an A-plus: Calistoga, Mill Valley, Hillsborough, Healdsburg and unincorporated Sonoma County.

The nine jurisdictions statewide that earned an A-plus had a housing target that averaged only 0.7 new units per 100 persons. Those that earned an F had an average of 3.3 units per 100 persons, said the report, commissioned by San Francisco think tank Next 10.

A-rated Beverly Hills was allocated the grand total of three units over the current eight-year cycle, even though a regional transportation plan predicted it would add 300 households and 3,400 jobs between 2008 and 2020.

“Those two calculations seemed to live in very different silos,” Fowler said. “That’s a problem.”

San Francisco got a B-plus, despite having a relatively high bar.

Four bills passed in the last two years are designed to impose consequences on cities that don’t meet their goals, and to improve the goal-setting process when the state enters its next cycle.

The Beacon report is based on the current cycle, which began in 2013, 2014 or 2015 and lasts for either five or eight years, depending on the region. Most regions are roughly midway through their cycles.

The process starts with the California Department of Housing and Community Development, which determines how much new housing each region needs based on population estimates from the Department of Finance. Those estimates rely largely on past rates of new household formation.

“The use of household growth forecasts as a benchmark for housing policy has become a vicious self-reinforcing process,” the report says. It fails to account for the fact that many Californians in high-cost areas are living with parents or roommates rather that moving out on their own. “By relying on past trends in household formation, the current housing needs assessment fails to capture the extent of housing demand in the state,” it said.

The housing department then tells each regional council of governments, such as the Association of Bay Area Governments (ABAG), how many new units should be created in its region. Each council, in consultation with local governments, divides that big number among its cities and unincorporated areas of counties. The allocation for each jurisdiction is further divided into housing at four income levels ranging from “very low income” to “above moderate income.”

The councils have a lot of flexibility when it comes to allocating these numbers, and their methodologies are often impenetrable.

Each jurisdiction is supposed to submit an annual progress report to the state housing department showing how many units they permitted in the four categories each year, but many don’t. Beacon found that 100 jurisdictions never submitted a report from 2013 to 2017. Most are in lower-income areas and may not have the staff of wealthier communities.

Beacon graded each of the state’s 539 jurisdictions based on two criteria: How many years it submitted an annual report (20 percent of its grade) and its prorated progress toward reaching its goal for the current cycle (80 percent). Beacon’s formula gave greater weight for the creation of very-low- and low-income housing. It prorated progress to adjust for the fact not every region’s cycle starts and ends at the same time. Data is through the end of 2017.

For the state as a whole, the findings were grim. Roughly halfway through the current cycle, only 25.9 percent of the allocated units have been completed across all income levels, the report said. And at their current rate of development, “certain jurisdictions in California will not meet their low-income housing production targets for more than 1,000 years.”

Of the state’s nine regions, the Bay Area got the highest grade, B-minus. But nobody’s cheering. ABAG set the targets when the Bay Area was coming out of the recession and did not envision the economic boom that drove rents and home prices into the stratosphere and forced many residents into long commutes.

“The bar was pretty low,” said Ken Kirkey, planning director for the Metropolitan Transportation Commission and ABAG. “I don’t think anyone in the Bay Area could say the region’s doing a great job.”

ABAG aligned its allocations with a longer-term plan that calls for creating housing near job and transit centers. The result was that “some of the larger cities received relatively larger allocations than some of the smaller jurisdictions,” Kirkey said.

Beacon gave Marin and Napa counties a B+, but their housing goals amounted to only 0.9 and 1.1 percent, respectively, of their 2017 populations.

San Francisco had the highest bar in the Bay Area, 3.3 percent, yet still managed a B-plus. During the current cycle, it permitted 13,091 units out of its 28,869 target, according to housing department data.

Rio Vista is the only Bay Area city that didn’t submit an annual report and scored an F. Pinole and Millbrae got an F for progress toward their goals, but Pinole got a final grade of C-minus because it turned in all its annual reports. Millbrae did not and scored a D-minus.

According to housing department data, Millbrae permitted only 3 units out of its 663 target by 2023. The report “does not accurately reflect Millbrae’s progress toward housing production,” Millbrae City Manager Tom Williams said.

The city has approved a total of 844 units — including 163 for low- or very-low-income households — in two housing projects next to the BART/Caltrain station, but has not yet permitted them. If it does, Millbrae would exceed its target.

Pinole has permitted only five units. Its goal, of 297 units, “is not unreasonable,” said Winston Rhodes, Pinole’s planning manager. He said the city has approved every housing application it has received, but not everyone who submits an application follows through to the permit stage. “Some of those bigger cities can go get grants” to develop affordable housing, he said. “Smaller cities have difficulty with that.”

Tiny Calistoga permitted 63 units through 2017, far surpassing its goal of 27 units. “That’s not a very high bar,” admits Lynn Goldberg, the city’s planning and building director.

The city bought a piece of land and leased it for $1 a year to a nonprofit developer, the Corporation for Better Housing, that built a 30-unit apartment building for very-low-income seniors. It opened last year.

At the other end of the spectrum, the city permitted 20 homes that are going up as part of the Four Seasons Resort & Residences Napa Valley. Asking prices range from $3.5 million to $5.7 million.

Kathleen Pender is a San Francisco Chronicle columnist. Email: kpender@sfchronicle.com

Twitter: @kathpender