BackgroundUp to 8% of the general population have a rare disease, however, for lack of ICD-10 codes for many rare diseases, this population cannot be generically identified in large medical datasets. We aimed to explorefrequency-based rare diagnoses(FB-RDx) as a novel method exploring rare diseases by comparing characteristics and outcomes of inpatient populations with FB-RDx to those with rare diseases based on a previously published reference list.MethodsRetrospective, cross-sectional, nationwide, multicenter study including 830,114 adult inpatients. We used the national inpatient cohort dataset of the year 2018 provided by the Swiss Federal Statistical Office, which routinely collects data from all inpatients treated in any Swiss hospital. Exposure: FB-RDx, according to 10% of inpatients with the least frequent diagnoses (i.e.1.decile) vs. those with more frequent diagnoses (deciles 2–10). Results were compared to patients having 1 of 628 ICD-10 coded rare diseases. Primary outcome: In-hospital death. Secondary outcomes: 30-day readmission, admission to intensive care unit (ICU), length of stay, and ICU length of stay. Multivariable regression analyzed associations of FB-RDx and rare diseases with these outcomes.Results464,968 (56%) of patients were female, median age was 59 years (IQR: 40–74). Compared with patients in deciles 2–10, patients in the 1. were at increased risk of in-hospital death (OR 1.44; 95% CI: 1.38, 1.50), 30-day readmission (OR 1.29; 95% CI 1.25, 1.34), ICU admission (OR 1.50; 95% CI 1.46, 1.54), increased length of stay (Exp(B) 1.03; 95% CI 1.03, 1.04) and ICU length of stay (1.15; 95% CI 1.12, 1.18). ICD-10 based rare diseases groups showed similar results: in-hospital death (OR 1.82; 95% CI 1.75, 1.89), 30-day readmission (OR 1.37; 95% CI 1.32, 1.42), ICU admission (OR 1.40; 95% CI 1.36, 1.44) and increased length of stay (OR 1.07; 95% CI 1.07, 1.08) and ICU length of stay (OR 1.19; 95% CI 1.16, 1.22).Conclusion(s)This study suggests that FB-RDx may not only act as a surrogate for rare diseases but may also help to identify patients with rare disease more comprehensively. FB-RDx associate with in-hospital death, 30-day readmission, intensive care unit admission, and increased length of stay and intensive care unit length of stay, as has been reported for rare diseases.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12874-023-01972-y.