How Many Fish Can You Keep in a 40-Gallon Tank?
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.
| Stock | Typical count | Reported range | Tanks |
|---|---|---|---|
| corydoras | 4.5 | 2–11 | 20 |
| shrimp | 7.5 | 4–45 | 8 |
| julii corydoras | 6 | 3–7 | 5 |
| panda corydoras | 3.5 | 3–6 | 4 |
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
| Stat | Value |
|---|---|
| Tanks in dataset | 5,134 |
| Overall median | 20 gal |
| Overall mean | 39 gal |
| Q1 (25th percentile) | 10 gal |
| Q3 (75th percentile) | 50 gal |
| Goldfish-keeper median | 40 gal (n = 481) |
| Cichlid-keeper Q1 | 40 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
| Layer | Species | Count |
|---|---|---|
| Centerpiece | Angelfish | 1-2 |
| Mid-water school | Neon tetras | 10-12 |
| Bottom school | Corydoras | 6-8 |
| Cleanup | Nerite snails | 2-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
| Layer | Species | Count |
|---|---|---|
| Top/mid | Guppies (all male or mixed) | 10-12 |
| Mid | Platies or swordtails | 4-6 |
| Bottom | Corydoras | 6 |
| Cleanup | Nerite snails | 2 |
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
| Species | Count |
|---|---|
| Fancy goldfish | 2-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
| Layer | Species | Count |
|---|---|---|
| Centerpiece | Dwarf gourami or honey gourami | 1-2 |
| Mid school | Harlequin rasboras | 10-12 |
| Bottom school | Corydoras | 6-8 |
| Algae crew | Amano shrimp | 5-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
| Species | Realistic count in 40 gal | Notes |
|---|---|---|
| Neon / cardinal tetras | 15-20 | Small, low bioload, school tightly |
| Guppies | 10-15 | Males only to control breeding |
| Corydoras | 8-10 | Floor space matters; 40-gal breeder is ideal |
| Angelfish | 2 (a pair) | Territorial when breeding |
| Goldfish (fancy) | 2-3 | Heavy waste producers |
| Dwarf gourami | 1-2 | One male per tank to avoid aggression |
| Rainbowfish | 6-8 | Active swimmers, need horizontal space |
| Cherry barbs | 8-10 | Peaceful, good dither fish |
| Cherry shrimp | 20-30+ colony | Nearly 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
| Standard | Breeder | |
|---|---|---|
| Dimensions | 48 x 13 x 16 in | 36 x 18 x 16 in |
| Footprint | 624 sq in | 648 sq in |
| Best for | Mid-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.
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 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)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
- The Complete Aquarium Book.
- Nitrogen and Water Quality, University of Rhode Island Cooperative Extension - Watershed Watch. View source ↗