Mathematical models can be very useful for understanding complicated systems, and for testing algorithms through simulations that would otherwise be difficult or expensive to implement. A model has been devised that simulates the sound localization performance of normal hearing persons, and that is being further refined for simulation of performance of hearing-impaired persons wearing two cochlear implants (CIs). The model is intended to be a tool in understanding the relative contribution of various factors involved in acoustic localization, and in developing new signal processing algorithms for neural encoding strategies. This presentation overviews the development of and results for the normal hearing model, and discusses modifications that are needed to simulate sound processing with binaural cochlear implants. The human head related transfer function (HRTF) is a critical component of the model, and provides the characteristics of head shadow, torso and pinna effects. It defines the temporal, intensity and spectral cues reaching each ear that are important for good localization ability. The model has been validated against published literature on HRTFs and localization in normal listeners, and is being further developed to account for differences in the signal pathway and sound reaching the CI user due to sound processing and microphone location effects.