The processes of mutation and nucleotide substitution contribute to the observed variability in virulence, transmission and persistence of viral pathogens. Since most viruses evolve many times faster than their human hosts, we are in the unusual position of being able to measure these processes directly by comparing viral genes that have been isolated and sequenced at different points in time. The analysis of such data requires the use of specific statistical methods that take into account the shared ancestry of the sequences and the randomness inherent in the process of nucleotide substitution. In this paper we describe the various statistical methods for estimating evolutionary rates, which can be classified into three general approaches: linear regression, maximum likelihood, and Bayesian inference. We discuss the advantages and shortcomings of each approach and illustrate their use through the analysis of two example viruses; human immunodeficiency virus type 1 and dengue virus serotype 4. Reliable estimates of viral substitution rates have many important applications in population genetics and phylogenetics, including dating evolutionary events and divergence times, estimating demographic parameters such as population size and generation time, and investigating the effect of natural selection on molecular evolution.