In situ determination of optimal harvest time of tomatoes is of value for growers to optimize fruit picking schedule. This study evaluates the feasibility of using visible and near infrared (VIS-NIR) spectroscopy to make an intact estimation of harvest time of tomatoes. A mobile, fibre-type, AgroSpec VIS-NIR spectrophotometer (Tec5, Germany), with a spectral range of 350-2200 nm, was used for spectral acquisition of tomatoes in reflection mode. The harvest time of tomatoes was measured by the days before harvest. After dividing spectra into a calibration set (70%) and an independent prediction set (30%), spectra in the calibration set were subjected to a partial least-squares regression (PLSR) with leave-one-out cross validation to establish calibration models. Validation of calibration models on the independent prediction set indicates that the best model can produce excellent prediction accuracy with coefficient of determination (R2) of 0.90, root-mean-square error of prediction (RMSEP) of 2.5 days and residual prediction deviation (RPD) of 3.01. It is concluded that VIS-NIR spectroscopy coupled with PLSR models can be adopted successfully for in situ determination of optimal harvest time of tomatoes, which allows for automatic fruit harvest by a horticultural robot.