OBJECTIVE: The preventive measures to be taken in the face of a new epidemic require knowledge of the number of infected and which groups are most vulnerable. To know the cumulative incidence of COVID-19 in the city of Madrid and its 21 districts in the first 4 months of the epidemic and its relationship with some socioeconomic and demographic variables. METHODS: Cross-sectional ecological study (39,270 cases). The 39,270 cases diagnosed from the beginning of the pandemic until June 26, 2020, published by the Comunidad de Madrid in were studied. In the districts, the distribution of gross and fair incidence is related to the ones of the independent variables (Municipal Statistics and Estudio de Salud 2018, Madrid Salud). The Incidence and the r and r(2) coefficients, obtained with the factors and the Multiple Linear Regression (MLR) model, are studied. RESULTS: The city of Madrid presents a cumulative incidence of COVID-19, which is double the national one (100), with a Standardized Cumulative Incidence Ratio (RIAE) of 204.59 per 100. The districts with the most RIAE were those in the southeast, all>240 per 100. In the districts, the per capita household rate, the per capita income, and the mortality rate from infectious diseases in men reached high and inverse correlations with RIAE (all r>-0.3). The RLM model with these 3 indicators predicts 30% of the RIAES. CONCLUSIONS: The relationship between material wealth and the risk of COVID-19 infection is inverse. The knowledge in the districts of per capita income, household rate and mortality rate due to infectious diseases in men reduces the uncertainty about the accumulated incidence by 30%.