Accurate estimation of human immunodeficiency virus (HIV) incidence rates is crucial for the monitoring of HIV epidemics, the evaluation of prevention programs, and the design of prevention studies. Traditional cohort approaches to measure HIV incidence require repeatedly testing large cohorts of HIV-uninfected individuals with an HIV diagnostic test (eg, enzyme-linked immunosorbent assay) for long periods of time to identify new infections, which can be prohibitively costly, time-consuming, and subject to loss to follow-up. Cross-sectional approaches based on the usual HIV diagnostic test and biomarkers of recent infection offer important advantages over standard cohort approaches, in terms of time, cost, and attrition. Cross-sectional samples usually consist of individuals from different communities. However, small sample sizes limit the ability to estimate community-specific incidence and existing methods typically ignore heterogeneity in incidence across communities. We propose a permutation test for the null hypothesis of no heterogeneity in incidence rates across communities, develop a random-effects model to account for this heterogeneity and to estimate community-specific incidence, and provide one way to estimate the coefficient of variation. We evaluate the performance of the proposed methods through simulation studies and apply them to the data from the National Institute of Mental Health Project ACCEPT, a phase 3 randomized controlled HIV prevention trial in Sub-Saharan Africa, to estimate the overall and community-specific HIV incidence rates.