This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

The nation’s most populous state shrank a bit in the second half of last year, according to official figures released Friday.

California had a population of 39.78 million as of January, the state Department of Finance said, down from its previous report of 39.96 million residents in July.

But Doug Kuczynski of the department’s Demographic Research Unit said the two numbers aren’t directly comparable because of various adjustments and because each figure represents a point in time. By the department’s reckoning, California added about 87,500 residents during the last full calendar year, comparing January-to-January figures.

The state has been creeping toward 40 million residents without ever quite getting there. It still tops second-place Texas, which has about 30 million people.

Even the January-to-January comparison used by the department shows population growth of just 0.2%, which officials said continues slow growth trends since the Great Recession. The figures predate the current recession caused by the coronavirus pandemic.

Growth slowed to near zero or declined in most coastal counties, grew slightly in the San Francisco Bay Area, and remained robust in the Central Valley and counties east of Los Angeles.

Los Angeles County lost residents for the second straight year, but it remains the nation’s most populous with more than 10 million residents.

Among other highlights:

— The fastest-growing counties were, in order, Glenn, Yuba, Placer, El Dorado, San Benito, San Joaquin and Kern.

— The state for the first time added more housing units than people. California has been struggling to address a severe affordable housing and homelessness problem.

— Bakersfield had the largest population gain, by percentage, among the state’s 10 largest cities.

— The fastest-growing cities from housing construction not related to wildfires were, in order, Colma in San Mateo County, Calimesa in Riverside County, Lathrop in San Joaquin County, Wasco in Kern County, and Rio Vista in Solano County.

Friday’s report did not address migration trends. But the department in December said more people were leaving California than moving in, thwarting projections from demographers who have predicted the state would top 40 million.

The department said then that more people left California between July 2018 and July 2019 for the first time since the 2010 census, leading to the state’s slowest recorded growth rate since 1900.

The state’s population had nearly tripled in the last half of the last century.