Using age-adjusted incidence rates and proportional incidence ratios, the risks of prostate cancer and breast cancer in three racial/ethnic groups - Spanish-surnamed whites, other whites and Japanese - were studied in Los Angeles County native residents and compared with those in immigrants and representative 'homeland' populations. An algorithm based on social security numbers was developed and utilised to estimate age at immigration for non-US-born Los Angeles County cancer patients. For prostate cancer, the incidence rates in Los Angeles County were much higher than those in the homelands for each racial/ethnic group. However, prostate cancer rates of immigrants were similar to those of US-born patients in the Spanish-surnamed white and Japanese populations, regardless of age at immigration. For breast cancer, the incidence rates in Los Angeles County were also high compared with those in the homelands. However, the timing of immigration to the US was important in determining breast cancer risk. When social security numbers indicated that migration occurred later in life, rates for breast cancer were substantially lower than when migration occurred early, although they were still much higher than in the homeland populations. These findings suggest that environmental factors in early life rather than in later life are important in the etiology of breast cancer and that later life events can substantially impact the likelihood of developing clinically detectable prostate cancer.