For maximum benefit, a female should be spayed before her first heat, to prevent accidental pregnancy and greatly reduce the risk of certain cancers. A male should be neutered before the onset of puberty, to prevent behaviors such as spraying from developing. Consult your veterinarian for the appropriate age for your pet.