We report the results of a comparison of student understanding of physics concepts with and without online homework, as measured by the force concept inventory. We compared students in large introductory courses taught by interactive engagement and noninteractive engagement methods and with ungraded homework and with online homework. We also compared the understanding of students in different grade subgroups. The increase in the average force concept inventory normalized gain was statistically significant for all students taught with online homework, indicating that graded homework increases student understanding of physics concepts. The gain was significantly higher for those students taught with interactive engagement methods together with online homework. The C grade subgroup taught by interactive engagement methods benefited more from the implementation of online homework than the other subgroups.