The typical dairy cow lives an average of five years, with the first two years focused on providing a strong foundation for the healthy development of the cow. From age two, the mature cow will become a productive member of the milking herd (meaning, she will produce milk). There are many contributing factors in the lifespan of a cow: genetics, environment, nutrition and overall health.
For more detailed information on lifespan of dairy cows, visit this link.