Background: Recording of the dark trough/light peak of the electrooculogram (EOG) remains a useful electrodiagnostic tool. Manual analysis of the recording is tedious and lengthy, and automated analysis needs to deal with artefacts due to suboptimal patient cooperation. Methods: We present a novel method of automating the processing and analysis of raw EOG data using the open-source statistical software R. Rather than attempting saccade detection, we utilize the fact that basic properties of the response (rough waveform timing) are known and simply fit a square wave to each response run - free parameters are amplitude and phase. To assess this analysis method, responses from 54 eyes of 27 patients with a variety of ophthalmic diagnoses were analysed with manual calculation and with a number of automated methods of fitting the response curve. The Arden ratio was the main outcome measure. Results: Robust regression of a fundamental with a three-harmonic approximation of a square wave was found to be the best method. Classification accuracy with this method compared with the manual calculations as gold standard; using a lower normal threshold of 200 , Arden ratio was found to achieve a sensitivity of 96 and specificity of 81 . Time taken to process and analyse the data for a subject was reduced from 20 min for the manual method to 2 min for the automated method. Conclusions: The simple approach yielded a surprisingly effective automatic estimation of the Arden ratio. In one author s laboratory (MB), this procedure has proved to be useful over 5 years for routine analysis.