An association between fertility and longevity has been known for many years, and considerable research has been focused on the mechanisms of ageing that ultimately determine longevity, which has remained essentially unchanged despite a near doubling of human life expectancy in the past 200 years. In this paper, the authors present evidence that the Sun determines the limits of longevity for the longest-living complex organisms. The Sun is a dynamical system and although solar cycles occur every 8-14 years (averaging approximately 11.1 years), the authors show that 28% of these cycles exhibit chaotic features and irregularly release up to 300% more ultraviolet radiation than usual. These chaotic solar cycles create an environment mutagenic to DNA that must be largely avoided in order to pass uncorrupted genes to the next generation. This requirement determines the limits of fertility, e.g., menarche and menopause in humans, and sets longevity to approximately 100 years.