Just like any other mammal, dogs can get breast cancer. It's most common in female dogs who are of middle age (7-10 years) and who have not been spayed. The earlier a dog is spayed, the lower her chances of getting breast cancer.
A dog spayed before her first heat has less than half a percentage chance (0.05%) of experiencing breast cancer. A dog which has gone through her first heat before being spayed has about an 8 percent chance of getting breast cancer. After the second heat, this rises to 26 percent. The U.S. Humane Society tracks breast cancer and many other pet diseases and furnishes reports on them for veterinarians and owners so they can assess the risks.
According to their latest numbers, while the risk rates above for female dogs remains relatively constant year-on-year, with only a slight rate of increase over the past decade, the rates for male dogs has been climbing faster, though this is likely due to better reporting. A male dog has a very small (less than 2 percent) chance of being diagnosed with breast cancer, but when they do, their chances of surviving are much smaller than are the survival rates for female dogs.
This is due to the forms of breast cancer, which can run the gamut of similarity to humans for female dogs, but which tend to only be two of the more aggressive types for male dogs.
The Humane Society stresses that the single most effective way to prevent breast cancer in female dogs is by having them spayed early.