In the world of fishkeeping, no other topic causes such debate, has so much controversies and so many variables to consider. I will cover some of the other variables in depth at a later stage but I will clearly dip into those I feel are particularly relevant here.
The formula covers cold and tropical freshwater types only as I have very little marine experience and am therefore not qualified to advocate an opinion.
First a brief overview:
Stocking density referees to the quantity of fish in a given size tank by total length of fish. Fish are usually measured from nose tip to the root of the tail (caudal peduncle). There are various ways of calculating this but here I will outlay the formula I use, mainly through an extrapolation of surface area and filtration method and filtration rates. Just to confirm, regardless of what density you achieve and target, I recommend a strict water change schedule of at least 20% removal / replacement every 2 weeks with de-chlorinated water and maintaining a good level of substrate hygiene (clean the gravel when you do a water change). Also, the maximum stocking density is to be reached gradually, over a period of at least 6 months. This allows the biological filtration capacity (good bacteria) to adjust to suit the extra load of fish and food waste.
The tank in question is filtrated by either an air powered undergravel filter, an air powered sponge / box filter or a 'low output' internal water pump type filter. By 'low output', I specify anything below a cyclic rate of 1.5x the total volume of water per hour through the filter.
To get your stocking density level for this type of tank, measure the surface area of the tank. I usually work in inches, but using my formula, centimeters will achieve the exact same result.
L x W = SA. Then I divide the surface area by 14. This gives me the overall length of fish that this sort of set-up can safely and consistently live in. Notice I said live, not survive!
SA / 14 = SD. For a 24 "x12" tank, this gives you a total of 20.5 "of fish.
To round up, I must make the admission that the 'Basic' prefix is a misnomer. I have used this very formula for breeding many species of fish and is also a great balance for a planted tank, regardless of its filtration capacity.
Now this is where I complicate things, but I do it for a reason. This prefix covers 'powerhead' driven undergravel filtration systems. Even though I dislike undergravel filters on the whole, I realize many will wish to stick with their. I started with one myself and reached the following conclusion, regardless of the powerheads performance, due to the fact that the substrate is forced into service as the only method of cleaning the water and that it is, by its very nature, potentially damaging to certain bottom feeding / foraging fish by harboring not just 'good' bacteria, but also the hidden nasties.
SA / 12 = SD. For a 30 "x12" tank, this gives you a total stocking density of 30 "of fish.
I must advise that when using an undergravel filter, substrate hygiene is particularly important and I advocate the use of a 'gravel hoover' every water change, to extract a greater amount of detritus from the gravel. I will show you how to make a DIY gravel hoover in tha Ideas section at a later date. They can be bought cheaply at most aquatic suppliers however.
This is a set-up I would 'generally' recommend for a first tank. This uses relatively low maintenance internal / external filtered tanks. For this stocking density I would be using a filter with a cyclic rate of iro 4x the total tank volume per hour.
SA / 9 = SD. For a 36 "x12" tank this allows 48 "of fish.
I would also recommend that once every 2 months, you should dismantle / remove the filter or sponges before a water change. Once removed, then remove the 20% water and rinse / squeeze the sponges in the removed water to free of detritus. DO NOT rinse sponges or any filtration media, in tap water, you'll kill all the bacteria (it's what chlorine is there for!) And your fish will follow suit very shortly after.
Advanced / High Density:
For a set-up to achieve a heavily stocked but sustainable ecosystem, the onus is on the fishkeeper to be committed, both financially and in the sense of his / her duty to the upkeep of the tank. The best filtration method I find for this is a sump filter, with high capacity and output external filters a close second. Internal filters may also be used but only really alongside either a large external or sump filter. Wet and dry filter beds are also fantastic in these circumstances and can easily be made / modified for use in conjunction with a sump filter.
For such high stocking densities I recommend a cyclic rate of at least 6x, the total volume of water per hour. Also, at this stage, I would also recommend purchasing a water testing kit.
SA / 6 = SD. For a 48 "x15" tank, this allows a staggering 120 "of fish.
Be sure that the fish you wish to stock are suitable for such high stocking densities. Malawi Cichlids often do well within such densely stocked tanks, as do many other territorial Cichlids and Barbs but in my experience, most Anabantids do not enjoy such restrictions.
This type of set-up is also ideal for larger / messy / carnivorous species such as Oscars and Piranha, but I do not recommend the same density of fish and would recommend a conversion of SA / 10 = SD for such species and similar.