Each year, malignant melanoma accounts for 57 000 deaths globally. If current rates continue, there will be an estimated 510 000 new cases annually and 96 000 deaths by 2040. Melanoma and keratinocyte cancers (KCs) incur a large societal burden. Using a mathematical population model, we performed an economic evaluation of the SunSmart program in the state of Western Australia (WA), a primary prevention program to reduce the incidence of skin cancer, versus no program. A societal perspective was taken combining costs to the health system, patients and lost productivity. The model combined data from pragmatic trial evidence of sun protection, epidemiological studies and national cost reports. The main outcomes modelled were societal and government costs, skin cancer counts, melanoma deaths, life years and quality-adjusted life years. Over the next 20 years, the model predicted that implementing the WA SunSmart program would prevent 13 728 KCs, 636 melanomas and 46 melanoma deaths per 100 000 population. Furthermore, 251 life years would be saved, 358 quality-adjusted life years gained and AU$2.95 million in cost savings to society per 100 000 population would be achieved. Key drivers of the model were the rate reduction of benign lesions from sunscreen use, the costs of purchasing sunscreen and the effectiveness of reducing KCs in sunscreen users. The likelihood of WA SunSmart being cost-effective was 90.1%. For the WA Government, the estimated return on investment was $8.70 gained for every $1 invested. Primary prevention of skin cancer is a cost-effective strategy for preventing skin cancers.