We study how the probability distribution functions of power input to the magnetosphere Pα and of the geomagnetic ap and Dst indices vary with averaging timescale, τ, between 3 hr and 1 year. From this we develop and present algorithms to empirically model the distributions for a given τ and a given annual mean value. We show that lognormal distributions work well for ap, but because of the spread of Dst for low activity conditions, the optimum formulation for Dst leads to distributions better described by something like the Weibull formulation. Annual means can be estimated using telescope observations of sunspots and modeling, and so this allows the distributions to be estimated at any given τ between 3 hr and 1 year for any of the past 400 years, which is another important step toward a useful space weather climatology. The algorithms apply to the core of the distributions and can be used to predict the occurrence rate of large events (in the top 5% of activity levels): they may contain some, albeit limited, information relevant to characterizing the much rarer superstorm events with extreme value statistics. The algorithm for the Dst index is the more complex one because, unlike ap, Dst can take on either sign and future improvements to it are suggested.