---Disclaimer: I am NOT a veterinarian---
One of the more expensive parts of owning multiple dogs is the heartworm medicine.
Most animal worming products are available over-the-counter. Heartworm preparations for dogs is different.
The issue is that some owners discontinue heartworm meds and their animals build up large loads of heartworms. A heavy dose of heartworm meds may kill those worms. Those dogs then have a significant number of dead worms in their system. Some may "let go" and float down stream just like a blood clot. Others will hang on and undergo "autolysis", that is they disintegrate and release non-dog proteins into the bloodstream. The dog's immune system responds to those foreign proteins just like a massive infection.
The "book" says to test the dog before restarting a heartworm program. If the dog shows any heartworms, then the vet may opt to titer up the heartworm med dosage to kill off the heartworms in stages. Each step is likely to be done under vet supervision with the dog being given "supportive therapy" of anti inflammatories and possibly IVs.
That means that if you purchase your annual supply of heartworm medicine after the start of mosquito season the vet is duty bound to recommend blood tests.
Even without the blood tests the cost of the meds are steep. A typical course of heartworm meds is $40 for a year.
A simple math exercise
---One more disclaimer: Any competent vet will inform you that using medications "off label" is risky and you are on your own if there is an adverse reaction.---
I will present this as a simple math exercise.
Ivomectin is one medicine that is used to treat heartworms. It is not perfect. It is not well tolerated by Border Collies and related herding breeds. It only kills the youngest stage of heartworms. It is extremely potent, it is used in very, very small doses that can be difficult to measure.
Another issue with Ivomectin is that herbivores are much more tolerant of the drug and concentrations used on cows, for instance, will have severe consequences if you dose a dog at the same rate. Consequently, you need to base your calculations on appropriate dosages for the target animal, in this case, a dog.
One common product for canine heartworms contains 272 mcg (millionths of a gram) of ivomectin. It is used on dogs between 51 pounds and 100 pounds. The middle of that dosing range is 272 mcg for a 75 pound dog.
The injectable formulation for Ivomectin is typically 1%. One percent is 10,000 parts per million or, 10,000 mcg per ml.
Suppose you want to dilute the injectable formulation so you can administer 1 cc of diluted solution for every 25 pounds of dog. This is a convenient dilution rate if you have a Boston Terrier (25 pounds...1ml) and two German Shepherds (75 pounds each...3ml each). 25 pounds is also very close, in weight, to 10 kg so you can easily translate if you prefer to think in metric.
272mcg/75lb = 90.7mcg/25lb.
10,000(mcg/ml)/90.7(mcg/ml) = 112:1 That is, diluting 1ml of the 1% injectable with 111ml of water will yield a solution of 90.6mcg/ml.
This is not injectable. It is either "drenched" directly into the dog's mouth or added to a small bowl of some kind of treat. Our dogs love milk, so that is what I would put it in.
This needs to be administered every month from a month before you expect to see mosquitoes (April, in Michigan) until a solid month after a killing freeze (November).
The bottle of 1% injectable will easily "keep" five years if you store it in the refrigerator You will have used only 10% of the stock solution even if you throw away the diluted solution and make fresh at the beginning of each year. So the cost advantage of mixing your own is $6/year vs. $120/year for three dogs.
Let me reiterate: I am not advising anybody to do this. I am pointing out the usefulness of mathematics for solving everyday problems in ratios.