Homework is a self-regulated activity that constitutes a large proportion of learning time. In mathematics, how long is the optimal homework time for achievement development and how to improve homework time efficiency have long been questions. The study examined how mathematics homework time was related to mathematics achievement among Chinese students in Grade 8 (N = 2440). The study also investigated how this relationship was moderated by self-regulated learning components (mathematics confidence, mathematics interest, mathematics anxiety, memorization strategies, elaboration strategies, and control strategies). After accounting for covariates, an inverted-U relationship between mathematics homework time and achievement was found by a generalized propensity score analysis. The optimal time that maximized achievement was 45 min per day. By increasing students’ mathematics interest, the optimal time was shortened to 35 min, and thus, mathematics achievement can be maximized with less homework time. The study provides guidance for teachers to assign the appropriate amount of homework and sheds light on the ways of improving homework time efficiency.