To examine whether the effects of low sleep quality, sleep deprivation, and chronotype on daytime cognitive function varied by age group. All data were collected online. We obtained the data from 366 employed people in their 20s, 40s, or 60s. The participants were required to fill out a questionnaire comprising of the Pittsburgh Sleep Quality Index, an Ultra-Short Version of the Munich ChronoType Questionnaire, and Karolinska Sleepiness Scale, and perform the online Stroop task through the web browser on their own PC. The results of analyses of variance showed that people in their 20s had more of an evening chronotype, while those in their 20s and 40s experienced more sleep loss than those in their 60s. Stroop interference, reflecting decline in selective attention, was greater in people in their 60s. The results of structural equation modeling showed that sleep loss tended to relate to lower Stroop interference in people in their 20s. Additionally, people in their 60s exhibited a significant relationship between lower sleep quality and lower Stroop interference in the reaction time. At least in this study, interindividual differences in sleep loss, chronotype, and sleep quality did not have a strong effect on cognitive function measured using the online Stroop task in the 40s age group. However, people in their 20s with sleep loss and those in their 60s with lower sleep quality showed higher selective attention, the mechanism of which requires further research.