Weigh the dog. Please weigh the dog.
This is the actual answer to the question and it is why people get it wrong in both directions. Deworming tablets are dosed per kilogram and the margin is not enormous. Under-dose — which is what almost everyone does, because people guess low — and you do not clear the worms, you just select for the ones that survive. Over-dose a small dog and you can make it genuinely ill.
Nobody has domestic scales that a 30kg dog will stand on. What works: pick the dog up, stand on the bathroom scale, subtract yourself. For a big dog, most vets will let you use the clinic scale for free even if you are not there for a consultation.
I did this and discovered my "about 25 kilos" Labrador was 31. I had been under-dosing her by a fifth for two years.
On frequency — three months is right for a dog that walks on the street here. Monthly is over the top for an adult and people do it out of anxiety. But if you have small children in the house, talk to your vet about going to every two months, because roundworm does transmit to people and children are the ones who get it.