In captivity, indoor cats typically live 14 to 20 years, though the oldest-known cat lived to age 36. Domesticated cats tend to live longer if they are not permitted to go outdoors (reducing the risk of injury from fights or accidents and exposure to diseases) and if they are neutered. Some such benefits are: castrated male cats cannot develop testicular cancer, spayed female cats cannot develop ovarian cancer, and both have a reduced risk of mammary cancer.
Like some other domesticated animals, cats live in a mutualistic arrangement with humans. It is believed that the benefit of removing rats and mice from humans' food stores outweighed the trouble of extending the protection of a human settlement to a formerly wild animal, almost certainly for humans who had adopted a farming economy. Unlike the dog, which also hunts and kills rodents, the cat does not eat grains, fruits, or vegetables.