Where the Inch-Per-Gallon Rule Comes From
Walk into any fish store and ask how many fish fit in a 20-gallon tank, and someone will recite the oldest rule in the hobby: one inch of fish per gallon of water. It dates back decades, to an era of under-gravel filters and sparse stocking, and it survives because it is beautifully simple. Twenty gallons, twenty inches of fish, done. But simplicity is also its flaw, because the rule quietly assumes something that is not true — that every inch of fish pollutes the water equally.
Compare a neon tetra and a goldfish. A neon tetra is a slender, two-inch wisp that eats a pinch of flakes and produces a whisper of waste. A goldfish is a deep-bodied eating machine that can reach ten inches and generates ammonia like a fish three times its length. Twenty inches of tetras in a 20-gallon tank is a lively, healthy community. Twenty inches of goldfish in the same tank is a water-quality disaster within weeks. The inch-per-gallon rule treats them as identical, which is why experienced keepers call it a starting point, never a verdict.
The honest version of the rule has three variables, not one: how much waste the fish produce (bioload), how fast the filter removes it (filtration capacity), and how much swimming space the species needs. This calculator combines all three. You enter the tank size, the total adult inches of fish, the filter's flow rate, and the species group — and it returns a stocking level that reflects reality instead of folklore.
Bioload: Why Species Changes the Math
Bioload is the total waste load your fish place on the system — ammonia from gills and solid waste, which your filter's bacteria convert to nitrite and then nitrate. Slim-bodied community fish like tetras, guppies, rasboras, and small danios are light polluters and follow the classic one-inch-per-gallon guideline closely. Bettas are similar per inch, though they must be housed with tank-mate rules of their own.
Cichlids — even the dwarf varieties — are messier eaters with faster metabolisms, so this calculator counts each of their inches as roughly 1.4 inches of community fish. Goldfish are in another league entirely: heavy-bodied, constant grazers with inefficient digestion. Each goldfish inch counts as about two inches of community fish, which is why a single fancy goldfish needs 20 gallons to itself and a common goldfish really belongs in a pond. Stocking a goldfish tank by the plain inch-per-gallon rule is the single most common beginner mistake in the hobby.
Filtration: The Multiplier Most Calculators Ignore
Your filter is the engine that makes stocking possible, and not all engines are equal. The standard measure is turnover: how many times per hour the filter moves the tank's full volume, expressed as GPH (gallons per hour) divided by tank gallons. A 20-gallon tank with a 100 GPH filter turns over 5 times per hour — solidly in the recommended 4–6x range for community tanks. The same tank with a 40 GPH filter manages only 2x, and its real safe capacity is far lower than the inch-per-gallon rule suggests.
This calculator converts turnover into a filtration modifier. At 4x turnover the modifier is 1.0 — the textbook baseline. Stronger filtration up to about 8x raises safe capacity (capped at a 40% bonus, because swimming space eventually becomes the limit), while weak filtration below 4x shrinks it (down to a 40% penalty). Two identical tanks with different filters genuinely support different numbers of fish, and now you can see by how much. When shopping for a filter, ignore the "up to X gallons" on the box — it is marketing. Divide its GPH by your tank size and aim for 4–6x for community fish, 6–8x for messy species like goldfish and cichlids.
Reading Your Stocking Level
The calculator expresses stocking as a percentage of safe capacity and sorts it into four bands. Under 85% is understocked — you have comfortable room to add fish, which is the ideal place to be. From 85% to 100% is fully stocked: a healthy maximum where water parameters stay stable with routine care. From 100% to 120% is overstocked — survivable with strong filtration and disciplined water changes, but with no margin for error. Above 120% is dangerously overstocked, and the honest advice is to upgrade the tank, upgrade the filter, or rehome fish before problems start.
Treat 100% as a ceiling to approach slowly, not a target to hit on day one. New tanks should be stocked gradually over weeks so the bacterial colony can grow into the load — adding all the fish at once to a fresh tank is how "new tank syndrome" wipes out a whole community overnight.
Your Water-Change Schedule, From Your Actual Numbers
Water changes are the other half of stocking math, and the right schedule depends on how hard the tank is working. Lightly stocked tanks (under 70%) thrive on 15% weekly changes. Moderately stocked tanks do well at 20%. At full stocking, 25% weekly keeps nitrates in the safe zone. Overstocked tanks need 30% weekly — or twice-weekly changes if nitrates still climb past 40 ppm between changes.
The calculator converts the percentage into gallons so you know exactly how much to siphon. A few habits make changes safer: match the new water's temperature within a couple of degrees, always add dechlorinator before the water touches the tank, and vacuum the substrate lightly rather than deep-cleaning it — the gravel bed houses much of your beneficial bacteria. Never change filter media and do a huge water change in the same week; that one-two punch can crash a cycle.
Counting Inches the Right Way
The most common measurement error is counting the fish you see today instead of the fish you will have in a year. That one-inch juvenile angelfish becomes a six-inch adult. The two-inch common pleco at the store becomes a two-foot tank-buster. Always look up the species' maximum adult size and use that figure for every fish. If you are unsure, round up — the calculator's safety margin will thank you.
Schooling fish add a second rule: many species need minimum group sizes to feel secure, typically six or more for tetras, rasboras, and corydoras. A "correct" inch count of three neon tetras is still wrong husbandry. Plan the school first, then check the inches fit — not the other way around.
Territory and Swimming Space: What Math Misses
No calculator can measure aggression or swimming style, so apply judgment on top of the numbers. A 20-gallon tall tank and a 20-gallon long tank hold the same water, but the long tank supports far more active swimmers like danios that patrol horizontal space. Territorial cichlids need broken sightlines — rocks and plants that divide the tank into claimed zones — or the inch math will not save the weakest fish. Bottom-dwellers like corydoras barely register in the water column but still count fully in bioload.
As a rule of thumb, if a species is known as nippy, territorial, or highly active, stock 10–20% lighter than the calculator suggests and provide the cover or space the species profile demands. The calculator handles chemistry; you handle behavior.
The Stocking Workflow That Works
Here is the process experienced keepers follow. First, choose your species and look up adult sizes and minimum group sizes. Second, add up the adult inches and run them through the calculator with your real tank gallons and filter GPH. Third, if the result is over 85%, either choose a smaller school, a larger tank, or a stronger filter — decide before buying, not after. Fourth, cycle the tank fully, then add fish in batches over several weeks, testing ammonia and nitrite between additions. Fifth, set your water-change schedule from the calculator's output and test nitrates monthly; if they creep past 40 ppm, increase the change volume before adding anything new.
Follow that sequence and the question "how many fish per gallon" answers itself — not with a folk rule, but with a number tuned to your tank, your filter, and your fish.
Common Stocking Mistakes
The classic errors are worth naming because the calculator cannot catch them. Adding too many fish too fast to a new tank crashes the nitrogen cycle. Trusting the filter box's "up to 30 gallons" claim instead of computing real turnover. Counting juvenile sizes. Mixing heavy-bodied goldfish with tropical community fish — different temperature needs and wildly different waste output. And the slow creep: a tank that was perfectly stocked a year ago becomes overstocked as every fish grows into its adult inches. Re-run your numbers once a year; your fish will not stay the size they were at the store.