How Many Fish Can You Keep in a 40-Gallon Tank?

· Updated · 5 min read

Planted 40-gallon freshwater aquarium with neon tetras schooling mid-water, a pair of angelfish, corydoras on the substrate, driftwood, and lush green plants

Short answer: A cycled, filtered 40-gallon tank holds 20-25 small community fish, or 8-12 medium fish, or 2-4 large fish. Real data from 5,134 tanks shows 40 gallons sits right at the overall mean, making it the sweet spot for a mixed community.

What people actually keep in a 40-gallon tank

Declarative “I keep…” reports from 20+ real 40-gallon tanks shared on Reddit (hypotheticals excluded). How we collect this.

StockTypical countReported rangeTanks
corydoras4.52–1120
shrimp7.54–458
julii corydoras63–75
panda corydoras3.53–64

Counts are real, declarative “I keep…” reports only (hypotheticals excluded). Wide ranges reflect genuine variation — a sanity range, not a rule.

The short answer

A 40-gallon tank holds 20-25 small community fish (tetras, rasboras, guppies), or 8-12 medium fish (angelfish, gouramis, rainbowfish), or 2-4 large fish (goldfish, blood parrots). The real number depends on species, filtration, and whether you mix layers (top, mid, bottom).

Forty gallons is the mean tank size across 5,134 real freshwater tanks in the AquaGauge dataset (mean 39 gallons, median 20 gallons). It is the point where serious community stocking becomes practical: enough water volume for 2-3 schools plus a centerpiece fish, with room for stable water chemistry.

Where 40 gallons sits in real fishkeeping

StatValue
Tanks in dataset5,134
Overall median20 gal
Overall mean39 gal
Q1 (25th percentile)10 gal
Q3 (75th percentile)50 gal
Goldfish-keeper median40 gal (n = 481)
Cichlid-keeper Q140 gal (n = 437)

Forty gallons lands right at the overall mean and matches the median tank for goldfish keepers. For cichlid keepers, 40 gallons is the bottom quartile. That tells you something: 40 gallons is comfortable for most community tropicals and goldfish, but small for species that need territory or grow large.

Four stocking plans that work

These are realistic community builds for a filtered, cycled 40-gallon. Pick one framework. Each assumes a heater (76-80 F for tropicals) and a hang-on-back or canister filter rated for 40+ gallons.

1. The classic tropical community

LayerSpeciesCount
CenterpieceAngelfish1-2
Mid-water schoolNeon tetras10-12
Bottom schoolCorydoras6-8
CleanupNerite snails2-3

This is the most common community setup at this size. Angelfish need at least 30 gallons tall; 40 gives them room to pair off. Keep neons large enough that the angelfish don’t eat them (add the tetras first and let them grow). Angelfish tank-size data.

2. The livebearer community

LayerSpeciesCount
Top/midGuppies (all male or mixed)10-12
MidPlaties or swordtails4-6
BottomCorydoras6
CleanupNerite snails2

Livebearers breed fast. If you mix sexes, expect fry. An all-male guppy tank avoids population explosions. Forty gallons gives you the buffer to handle a surprise batch without crashing water quality.

3. The goldfish tank

SpeciesCount
Fancy goldfish2-3
Nerite snails (optional)2-3

Goldfish produce heavy waste and grow to 6-8 inches. The median goldfish keeper in our data runs exactly 40 gallons (n = 481). Two fancies is safe; three works with strong filtration (rated for 2x the tank volume). Do not mix goldfish with tropical fish; they need cooler water (65-72 F).

4. The planted mid-tech community

LayerSpeciesCount
CenterpieceDwarf gourami or honey gourami1-2
Mid schoolHarlequin rasboras10-12
Bottom schoolCorydoras6-8
Algae crewAmano shrimp5-6

Planted tanks handle more bioload because the plants absorb nitrate. The median planted-tank keeper runs 20 gallons (n = 436, Q3 = 40 gallons), so 40 gallons is the upper range for planted setups and gives plenty of space for a lush layout with moderate fish load.

What fits by species type

SpeciesRealistic count in 40 galNotes
Neon / cardinal tetras15-20Small, low bioload, school tightly
Guppies10-15Males only to control breeding
Corydoras8-10Floor space matters; 40-gal breeder is ideal
Angelfish2 (a pair)Territorial when breeding
Goldfish (fancy)2-3Heavy waste producers
Dwarf gourami1-2One male per tank to avoid aggression
Rainbowfish6-8Active swimmers, need horizontal space
Cherry barbs8-10Peaceful, good dither fish
Cherry shrimp20-30+ colonyNearly zero bioload

These counts assume each species as the primary stock. In a mixed community, reduce each group proportionally.

Why the inch-per-gallon rule fails

The old “one inch of fish per gallon” formula would put 40 inches of fish in a 40-gallon tank. That means 40 neon tetras or one 40-inch fish. Both are wrong.

The classic aquarium author William T. Innes measured it differently: “A good working rule is Twenty-Four Square Inches of Water Surface to Every Inch of Body Length of Fish.”1 A standard 40-gallon tank (48 x 13 inches) has roughly 624 square inches of surface. By Innes’s formula, that supports about 26 inches of total fish body length. A school of 12 neon tetras (1.5 inches each = 18 total inches) plus 6 corydoras (2 inches each = 12 total inches) already hits 30 inches, right at the limit without a centerpiece.

But surface area is only half the equation. Bioload (waste production) and filtration capacity matter more for modern tanks with power filters. A 40-gallon with a filter rated for 200 GPH can handle more than a 40-gallon with an undergravel filter from the 1970s. Ammonia should always read 0 ppm in a cycled tank.2 Test weekly with a liquid kit, not strips.

40-gallon standard vs 40-gallon breeder

StandardBreeder
Dimensions48 x 13 x 16 in36 x 18 x 16 in
Footprint624 sq in648 sq in
Best forMid-water swimmers (tetras, rainbowfish)Bottom-dwellers (corydoras, loaches, shrimp)

The breeder is shorter but wider. It gives more floor area for bottom schools and is easier to aquascape with driftwood layouts. The standard is better for tall fish like angelfish.

Plan your 40-gallon

Stocking calculator | Tank volume calculator | What size aquarium do you need?

How we counted

Figures are from the July 2026 dataset snapshot. Tank-size distribution comes from 5,134 real tanks across multiple fishkeeping subreddits (r/Aquariums, r/goldfish, r/plantedtank, r/cichlid, and others) where keepers declared their tank size. Goldfish-specific data covers 481 tanks from r/goldfish. Cichlid data covers 437 tanks from r/cichlid. How we collect this data.

Check your exact stocking

Add your fish below to see stocking %, filtration load and compatibility for your setup — live.

Add fish below to see your stocking level
Stocking level
Filtration

Stocking — under 85% comfortable · 85–100% full · over 100% overstocked

    Show the math

    Gear for this setup

    As an Amazon Associate AquaGauge earns from qualifying purchases. Some links below are affiliate links, at no extra cost to you. Current price and availability are shown on Amazon. Disclosure.

    • Marineland Penguin Bio-Wheel 200 GPH Power Filter
      Marineland Penguin Bio-Wheel 200 GPH Power FilterA proven HOB filter rated for up to 40 gallons with biological and mechanical filtration in one unit.Check price on Amazon →
    • hygger Aquarium Heater (200 W)
      hygger Aquarium Heater (200 W)An adjustable 200 W with an intelligent controller, rated by the maker for 20 to 40 gallon tanks, which holds the 76-80 F most tropical community fish need.Check price on Amazon →

    FAQ

    How many fish can I put in a 40-gallon breeder?
    The same total bioload as a standard 40-gallon, but the breeder's wider footprint (36 x 18 inches vs 48 x 13) gives more floor space for bottom-dwellers like corydoras and loaches. You can keep a slightly larger school of bottom fish.
    Is the one-inch-per-gallon rule accurate?
    No. A 10-inch oscar and forty 1-inch neon tetras have very different bioloads. Stock by species adult size, temperament, and filtration capacity, not a simple length formula.
    Can I keep goldfish in a 40-gallon tank?
    Yes. 40 gallons is the median tank size among real goldfish keepers (n = 481). It holds 2-3 fancy goldfish comfortably with good filtration.
    Do I need a heater for a 40-gallon tank?
    For tropical fish (tetras, corydoras, angelfish), yes. A 150-200 W adjustable heater holds 76-80 F. Goldfish and white cloud minnows do fine at room temperature.

    Sources

    1. William T. Innes. The Complete Aquarium Book.
    2. Nitrogen and Water Quality, University of Rhode Island Cooperative Extension - Watershed Watch. View source ↗
    Yevhen Bulhakov
    By Yevhen Bulhakov · fishkeeper & founder, reviewed against real-tank data.
    Freshwater aquarist of 8+ years.