EasySpin, a computational package for spectral simulation and analysis in EPR, is described. It is based on Matlab, a commercial technical computation software. EasySpin provides extensive EPR-related functionality, ranging from elementary spin physics to data analysis. In addition, it provides routines for the simulation of liquid- and solid-state EPR and ENDOR spectra. These simulation functions are built on a series of novel algorithms that enhance scope, speed and accuracy of spectral simulations. Spin systems with an arbitrary number of electron and nuclear spins are supported. The structure of the toolbox as well as the theoretical background underlying its simulation functionality are presented, and some illustrative examples are given.