Online calculators are always going to be inaccurate, there's just too much to consider when stocking a tank.
Size of the fish is only the first thing.
Bioload is important. E.g. One 6" pleco will create a lot more waste than 12 ember tetras.
Activity level is hugely important. One betta needs a much smaller tank than one Danio, because Danio are active lil things.
Area of the water column is also important.
Say you have a 20g long tank. 18 Danio would be cramped.
6 Danio, 6 cory, and 6 pencilfish would be lovely, because whilst Danio dart all over the tank, Cory are bottom dwellers, and pencils are surface.
Then there's each fishes compatibility.
You could fit one betta and six neon tetras in a 20g tank, but you shouldn't. Neons require much cooler temperatures. (Betta as a community fish is a bad idea anyway, but, this is just an example).
You could put mollys in with Kuhli loach, but the mollys would be much happier in brackish water.
You could fit pea puffers in with loads of different fish; they're teeny. But aggressive as heck.
There's a million different examples, because each fish needs to be considered on all basis, not just how big it's gonna get.
The filter advice above is correct, and best way to keep on top of the bioload, along with water changes. The rest is up to you to research.