A majority of Californians today are migrants from other states. The first great wave of migration, beginning in 1848, brought at least 85,000 prospectors by 1850. Perhaps 20,000 of them were foreign-born, mostly from Europe, Canada, Mexico, and South America, as well as a few from the Hawaiian Islands and China. Many thousands of Chinese were brought in during the latter half of the 19th century to work on farms and railroads. When Chinese immigration was banned by the US Congress in 1882, Japanese migration provided farm labor. These ambitious workers soon opened shops in the cities and bought land for small farms. By 1940, about 94,000 Japanese lived in California. During the depression of the 1930s, approximately 350,000 migrants came to California, most of them looking for work. Many thousands of people came there during World War II to take jobs in the burgeoning war industries; after the war, some 300,000 discharged servicemen settled in the state. All told, between 1940 and 1990 California registered a net gain from migration of 12,426,000, representing well over half of its population growth during that period.
In the 1990s California registered net losses in domestic migration, peaking with a loss of 444,186 in 1993–94. Altogether net losses in domestic migration between 1990 and 1998 totaled 2,082,000 people. During the same period, net gains in international migration totaled 2,019,000. As of 1996, nearly 22% of all foreign immigrants in the US were living in California, a higher proportion than in any other state. Although the 1970s brought an influx of refugees from Indochina, and, somewhat later, from Central America, the bulk of post-war foreign immigration has come from neighboring Mexico. At first, Mexicans—as many as 750,000 a year—were imported legally to supply seasonal labor for California growers. Later, hundreds of thousands—perhaps even millions—of illegal Mexican immigrants crossed the border in search of jobs and then, unless they were caught and forcibly repatriated, stayed on. Counting these state residents for census purposes is extremely difficult, since many of them are unwilling to declare themselves for fear of being identified and deported. As of 1990, California's foreign-born population was reported at 8,055,000, or 25% of the state's total. As of 1994, the number of undocumented immigrants was estimated at between 1,321 and 1,784—the highest number of any state and close to 40% of the total number thought to be residing in the US. As of 1998, California was the intended residence of 170,126 foreign immigrants (more than any other state and 26% of the US total that year), of these 62,113 were from Mexico.
Intrastate migration has followed two general patterns: rural to urban until the mid-20th century, and urban to suburban thereafter. In particular, the percentage of blacks increased in Los Angeles, San Francisco, and San Diego between 1960 and 1970 as black people settled or remained in the cities while whites moved into the surrounding suburbs. In the 1970s and 1980s, the percentage of blacks in Los Angeles and San Francisco decreased slightly; in San Diego, the percentage of blacks increased from 8.9% to 9.4%. By 1997, blacks represented 8.3% of the Los Angeles metropolitan population, 8.8% of the San Francisco metropolitan population, and only 6.4% of the San Diego metropolitan population, a 3% decrease from the 1980s. California's net gain from migration during 1970–80 amounted to about 1,573,000. In the 1980s, migration accounted for 54% of the net population increase, with about 2,940,000 new residents. Between 1990 and 1998, the state's overall population increased by 9.7%. In the period 1995–2000, 1,448,964 people moved into the state and 2,204,500 moved out, for a net loss of 755,536.