The temblor hit 2.5 miles north-northwest of Glen Avon and 3.7 miles southwest of Fontana.
The earthquake happened at 7:19 p.m., according to the geological survey.
Residents reported feeling the quake in areas such as Rancho Cucamonga, Corona, Jurupa Valley and Riverside, to name a few.
There were no immediate reports of damage or injuries.