Light availability is one of the key drivers of animal activity, and moonlight is the brightest source of natural light at night. Moon phase is commonly used but, while convenient, it can be a poor proxy for lunar illumination on the ground. While the moon phase remains effectively constant within a night, actual moonlight intensity is affected by multiple factors such as disc brightness, position of the moon, distance to the moon, angle of incidence, and cloud cover. A moonlight illumination model is presented for any given time and location, which is significantly better at predicting lunar illumination than moon phase. The model explains up to 92.2% of the variation in illumination levels with a residual standard error of 1.4%, compared to 60% explained by moon phase with a residual standard error of 22.6%. Importantly, the model not only predicts changes in mean illumination between nights but also within each night, providing greater temporal resolution of illumination estimates. An R package moonlit facilitating moonlight illumination modelling is also presented. Using a case study, it is shown that modelled moonlight intensity can be a better predictor of animal activity than moon phase. More importantly, complex patterns of activity are shown where animals focus their activity around certain illumination levels. This relationship could not be identified using moon phase alone. The model can be universally applied to a wide range of ecological and behavioural research, including existing datasets, allowing a better understanding of lunar illumination as an ecological resource.Significance statementMoon phase is often used to represent lunar illumination as an environmental niche, but it is a poor proxy for actual moonlight intensity on the ground. A model is therefore proposed to estimate lunar illumination for any given place and time. The model is shown to provide a significantly better prediction of empirically measured lunar illumination than moon phase. Importantly, it also has much higher temporal resolutions, allowing to not only detect selectiveness for light levels between nights but also within each night, which is not achievable with moon phase alone. This offers unprecedented opportunities to study complex activity patterns of nocturnal species using any time-stamped data (GPS trackers, camera traps, song meters, etc.). It can also be applied to historical datasets, as well as facilitate future research planning in a wide range of ecological and behavioural studies.