Assessment of pancreas cell type composition is crucial to the understanding of the genesis of diabetes. Current approaches use immunodetection of protein markers, for example insulin as a marker of beta-cells. A major limitation of these methods is that protein content varies in physiological and pathological conditions, complicating the extrapolation to actual cell number. Here we demonstrate the use of cell type-specific DNA methylation markers for determining the fraction of specific cell types in human islet and pancreas specimens. We identified genomic loci that are uniquely demethylated in specific pancreatic cell types and applied targeted PCR to assess the methylation status of these loci in tissue samples, enabling inference of cell type composition. In islet preparations, normalization of insulin secretion to beta-cell DNA revealed similar beta-cell function in pre-T1D, T1D and T2D , which was significantly lower than in non-diabetic donors. In histological pancreas specimens from recent-onset T1D this assay showed beta-cell fraction within the normal range, suggesting a significant contribution of beta-cell dysfunction. In T2D pancreata we observed increased alpha-cell fraction and normal beta-cell fraction. Methylation-based analysis provides an accurate molecular alternative to immune detection of cell types in the human pancreas, with utility in the interpretation of insulin secretion assays and the assessment of pancreas cell composition in health and disease.