Treatment entails injections and oftentimes hospitalization is required. Recovery can take up to a couple of months. The American Animal Hospital Association places the average cost of preventative for dogs at $5-15 per month, and the cost of treating a dog with heartworm at $400-1,000.