Pumpkin is one of the more sensible home additions for dogs, and unlike most it has a plausible mechanism behind it.
What it does
Pumpkin is largely water and soluble fibre. Soluble fibre absorbs water and forms a gel, which is why the same food is recommended for opposite problems.
In loose stool, it absorbs excess water and adds bulk, firming things up. In constipation, it adds moisture and bulk, making stool easier to pass. Both effects come from the same property.
It also ferments in the large intestine to produce short-chain fatty acids, which the cells lining the colon use as fuel. That is the reason fibre is a component of many veterinary intestinal diets rather than just a home remedy.
It is not a treatment for the cause of anything. A dog with diarrhoea from a parasite, an infection or a foreign body needs the cause addressed, and pumpkin will not do it.
Buy the right thing

The tin that says pumpkin purée and lists pumpkin as the only ingredient is the one to buy. The tin that says pumpkin pie filling contains sugar and spices, and some spice blends include nutmeg, which is not something to give a dog.
Fresh pumpkin works too, cooked plain with no salt, butter or oil, and mashed. Skin and seeds are not needed.
How much

The amounts are smaller than most people assume. A common starting point is around one teaspoon per 5 kg of body weight per day, mixed into food. So roughly:
- A 5 kg dog — about 1 teaspoon
- A 10 kg dog — about 2 teaspoons
- A 20 kg dog — about 1 tablespoon
- A 30 kg dog — about 1½ tablespoons
Start at the lower end and split it across meals. Too much fibre too quickly produces gas and loose stool, which is exactly what you were trying to fix.
How often
For a short-term upset, once or twice a day for a few days is typical, stopping once things are normal.
As a long-term addition for a dog prone to firm or irregular stools, a small daily amount is reasonable, but it should be counted in the daily calories and it is worth mentioning to a vet. Persistent digestive irregularity that needs managing every day is a reason for a proper diet discussion rather than an indefinite home remedy.
When not to reach for it
Pumpkin is not the right response to any of the following, all of which need a vet: blood in the stool, repeated vomiting, straining without producing anything, a swollen or painful abdomen, lethargy or refusing food, diarrhoea lasting more than a couple of days, or any of this in a puppy or an elderly dog.
Using a home remedy to wait out something that needed attention is the main risk here, and it is more common than any problem with the pumpkin itself.
Calories
Plain pumpkin is low in calories, but treats and additions together should stay under about 10% of the daily total. For a small dog, a generous spoonful of anything is a meaningful share of that, so it is worth subtracting rather than adding.
Why fibre helps two opposite problems
It is worth understanding, because it explains why the same spoonful is recommended for a dog with diarrhoea and for one that is constipated, which sounds like nonsense until the mechanism is clear.
Soluble fibre does not act on the gut directly. It absorbs water and forms a gel, and that gel changes the consistency of what is passing through in whichever direction it needs changing. In a gut moving too fast with too much water, it binds the excess. In a gut moving too slowly with dry contents, it holds moisture that would otherwise be absorbed.
That is also why the amount matters more than the frequency. Too little does nothing measurable; too much overwhelms the system and causes gas and loose stool in a dog that had neither.
Alternatives that do the same job
Plain cooked sweet potato and plain cooked butternut squash behave similarly, and a small amount of psyllium husk is used the same way, typically in smaller quantities again. Some commercial intestinal diets are built around exactly this principle at a controlled inclusion rate, which is why they usually outperform home additions for a dog that needs it long term.
None of those is a reason to avoid pumpkin for a short-term upset. They are a reason not to manage a chronic problem with a kitchen cupboard indefinitely.
