AbstractMany cancer types display sex and age disparity in incidence and outcome. Here, we establish a mathematical approach using cancer mutational data to analyze how sex and age shape the tumour genome. We model how age-related (clock-like) somatic mutations that arise during cell division, and extrinsic (environmental) mutations accumulate in cancer genomes. As a proof-of-concept, we apply our approach to melanoma, a cancer driven by cell-intrinsic age-related mutations and extrinsic ultraviolet light-induced mutations, and show these mutation types differ in magnitude, chronology and by sex in the distinct molecular melanoma subtypes.Our model confirms age and sex are determinants of cellular mutation rate, shaping the final mutation composition. We show mathematically for the first time how, similar to non-cancer tissues, melanoma genomes reflect a decline in cell division during ageing. We find clock-like mutations strongly correlate with the acquisition of ultraviolet light-induced mutations, but critically, males present a higher number and rate of cell division-linked mutations. These data indicate the contribution of environmental damage to melanoma likely extends beyond genetic damage to affect cell division.