Heartworms can live in dogs for up to 7 years before it becomes fatal. So without treatment your dog will live from 5 to 7 years with the heartworm disease.
Heartworm can be treated and cured though if you take your dog to the vet before the heartworm spreads to far.
Your dogs vet can prescribe some heartworm medication to kill off and get rid of the dogs heartworms.