We present a new automatic code (ARES) for determining equivalent widths of the absorption lines present in stellar spectra. We also describe its use for determining fundamental spectroscopic stellar parameters. The code is written in C++ based on the standard method of determining EWs and is available for the community. The code automates the manual procedure that the users normally carry out when using interactive routines such as the splot routine implemented in IRAF. Results.We test the code using both simulated and real spectra with different levels of resolution and noise and comparing its measurements to the