An optical system that can record the refractive index of a transparent liquid with an accuracy of 0.0005 and a temporal resolution of about 0.10 ms is developed. It employs a lateral photodetector to track the position of the refracted beam. The relationship between the refractive index of the liquid and the outputs of the photodetector is derived and confirmed by experiments. For a simple application the system is used to record the equilibration time of a binary mixture. © 2003 Society of Photo-Optical Instrumentation Engineers.