Background: The WHO classification separates mastocytosis into distinct variants, but prognostication remains a clinical challenge. The aim of this study was to improve prognostication for patients with mastocytosis. Methods: We analysed data of the registry of the European Competence Network on Mastocytosis including 1639 patients (age 17–90 years) diagnosed with mastocytosis according to WHO criteria between Jan 12, 1978, and March 16, 2017. Univariate and multivariate analyses with Cox regression were applied to identify prognostic variables predicting survival outcomes and to establish a prognostic score. We validated this International Prognostic Scoring System in Mastocytosis (IPSM) with data of 462 patients (age 17–79 years) from the Spanish network Red Española de Mastocitosis diagnosed between Jan 22, 1998, and Nov 2, 2017. Findings: The prognostic value of the WHO classification was confirmed in our study (p<0·0001). For patients with non-advanced mastocytosis (n=1380), we identified age 60 years or older (HR 10·75, 95% CI 5·68–20·32) and a concentration of alkaline phosphatase 100 U/L or higher (2·91, 1·60–5·30) as additional independent prognostic variables for overall survival. The resulting scoring system divided patients with non-advanced mastocytosis into three groups: low (no risk factors), intermediate 1 (one risk factor), and intermediate 2 (two risk factors). Overall survival and progression-free survival differed significantly among these groups (p<0·0001). In patients with advanced mastocytosis (n=259), age 60 years or older (HR 2·14, 95% CI 1·42–3·22), a concentration of tryptase 125 ng/mL or higher (1·81, 1·20–2·75), a leukocyte count of 16 × 109 per L or higher (1·88, 1·27–2·79), haemoglobin of 11 g/dL or lower (1·71, 1·13–2·57), a platelet count of 100 × 109 per L or lower (1·63, 1·13–2·34), and skin involvement (0·46, 0·30–0·69) were prognostic variables. Based on these variables, a separate score for advanced mastocytosis with four risk categories was established, with significantly different outcomes for overall survival and progression-free survival (p<0·0001). The prognostic value of both scores was confirmed in 413 patients with non-advanced disease and 49 with advanced mastocytosis from the validation cohort. Interpretation: The IPSM scores for patients with non-advanced and advanced mastocytosis can be used to predict survival outcomes and guide treatment decisions. However, the predictive value of the IPSM needs to be confirmed in forthcoming trials. Funding: Austrian Science Fund, Deutsche Forschungsgemeinschaft, Koeln Fortune Program, Charles and Ann Johnson Foundation, Instituto de Salud Carlos III, Fondos FEDER, Research-Foundation Flanders/Fonds Wetenschappelijk Onderzoek, Clinical Research-Fund of the University Hospitals Leuven, and Research-Foundation Flanders/Fonds Wetenschappelijk Onderzoek.