To evaluate the association between refractive error and the prevalence of glaucoma by race or ethnicity. Cross-sectional study. Kaiser Permanente Northern California Health Plan members with refractive error measured at 35 years of age or older between 2008 and 2014 and with no history of cataract surgery, refractive surgery, or a corneal disorder. We identified 34 040 members with glaucoma or ocular hypertension (OHTN; cases) and 403 398 members without glaucoma (controls). Glaucoma cases were classified as primary angle-closure glaucoma (PACG); 1 of the 4 forms of open-angle glaucoma: primary open-angle glaucoma (POAG), normal-tension glaucoma (NTG), pigmentary glaucoma (PIGM), and pseudoexfoliation glaucoma (PEX); or OHTN. Refractive error, expressed as spherical equivalent (SE), was coded as a continuous trait and also as categories. Logistic regression analyses were used to estimate the association between refractive error and the prevalence of glaucoma overall and in specific racial or ethnic groups. The association between refractive error and glaucoma subtypes evaluated as odds ratios (ORs) with 95% confidence intervals (CIs). In controls, the mean SE was -0.59 diopters (D) (standard deviation, 2.62 D). Each 1-D reduction in SE was associated with a 22% decrease in the odds of PACG (OR, 0.78; 95% CI, 0.77-0.80) and with increases in the odds of open-angle glaucoma ranging from 1.23 (95% CI, 1.20-1.26) for PIGM, to 1.07 (95% CI, 1.03-1.11) for PEX, and to 1.05 (95% CI, 1.04-1.06) for OHTN. In addition, we observed a stronger association between myopia and POAG among non-Hispanic whites (OR, 1.12; 95% CI, 1.11-1.13) and NTG among Asians (OR, 1.17; 95% CI, 1.15-1.20) and non-Hispanic whites (OR, 1.19; 95% CI, 1.15-1.22). Myopia was associated with an increased prevalence of all forms of open-angle glaucoma and OHTN, whereas hyperopia was associated with a substantially increased prevalence of PACG. Although high myopia is a strong risk factor for glaucoma subtypes, low and moderate myopia also have a significant effect on glaucoma risk. Additionally, there were moderate racial differences in the association of myopia with the risk of POAG and NTG.