The diagnostic work-up of primary aldosteronism (PA) includes screening and confirmation steps. Case confirmation is time-consuming, expensive, and there is no consensus on tests and thresholds to be used. Diagnostic algorithms to avoid confirmatory testing may be useful for the management of patients with PA.Development and validation of diagnostic models to confirm or exclude PA diagnosis in patients with a positive screening test.We evaluated 1,024 patients who underwent confirmatory testing for PA. The diagnostic models were developed in a training cohort (n=522), and then tested on an internal validation cohort (n=174) and on an independent external prospective cohort (n=328).Different diagnostic models and a 16-point score were developed by machine learning and regression analysis to discriminate patients with a confirmed diagnosis of PA.Male sex, antihypertensive medication, plasma renin activity, aldosterone, potassium levels and presence of organ damage were associated with a confirmed diagnosis of PA. Machine learning based models displayed an accuracy of 72.9-83.9%. The Primary Aldosteronism Confirmatory Testing (PACT) score correctly classified 84.1% at training and 83.9% or 81.1% at internal and external validation, respectively. A flow chart employing the PACT score to select patients for confirmatory testing, correctly managed all patients, and resulted in a 22.8% reduction in the number of confirmatory tests.The integration of diagnostic modelling algorithms in clinical practice may improve the management of patients with PA by circumventing unnecessary confirmatory testing.