ThisCalculator

Home and garden

Aquarium Fish Compatibility Calculator: How It Works

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

Aquarium Fish Compatibility Calculator: How It Works

This calculator helps you check whether the fish you plan to keep are likely to get along, based on their temperament, size, water temperature, pH range, and swimming zone. You enter the species you want to keep (or select from a built-in list), and it returns a compatibility score and a list of potential conflicts, so you can avoid the most common tank disasters before they happen.

Formula

The calculator uses a simple scoring model that penalizes mismatches in temperament, water temperature, and tank size. The base score is 100. For each level of temperament above peaceful (1), subtract 10 points. For every degree Celsius away from 25°C, subtract 2 points. If the tank volume is below 100 litres, subtract 15 points. The result is clamped to a minimum of 0.

Symbolically: Score = max(0, 100 − (T − 1)×10 − |t − 25|×2 − (V < 100 ? 15 : 0))

  • T = temperament level (1 = peaceful, 2 = semi-aggressive, 3 = aggressive)
  • t = water temperature in °C
  • V = tank volume in litres

This is a heuristic, not a biological law. It gives a rough idea of risk, not a guarantee of peace.

Worked Example

Using the default values: species list = Guppy, Neon Tetra, Angelfish, Betta, Goldfish, Zebra Danio, Corydoras, Molly, Platy, Rainbowfish; temperament = Peaceful (1); tank size = 100 L; water temperature = 25°C.

Step 1: Temperament penalty = (1 − 1)×10 = 0.

Step 2: Temperature penalty = |25 − 25|×2 = 0.

Step 3: Tank size penalty = (100 < 100 ? 15 : 0) = 0.

Step 4: Score = max(0, 100 − 0 − 0 − 0) = 100.

So the default setup scores 100, meaning high compatibility. The warnings output is 0, because temperament is peaceful and tank size is not below 100 L.

Why Compatibility Matters

Fish compatibility is about more than just aggression. Even peaceful fish can stress each other if they compete for the same territory or have different water requirements. For example, a goldfish prefers cooler water (around 20°C) while a discus needs 28°C – keeping them together means one will be sickly. Similarly, a betta (Siamese fighting fish) is fine with some tankmates but will attack fish with bright colours or long fins that resemble rivals. A compatibility calculator helps you catch these issues before you buy.

Key Factors in Fish Compatibility

  • Temperament: Peaceful, semi-aggressive, or aggressive. Aggressive fish like cichlids often need to be kept with larger, robust species or alone.
  • Adult size: A fish that is small when bought may grow large enough to eat its tankmates. For example, a common pleco grows to 30+ cm, while a bristlenose pleco stays under 15 cm.
  • Water temperature: Most tropical fish do well at 24–27°C, but coldwater fish like goldfish need 18–22°C. Mixing them is a common mistake.
  • pH range: Soft-water fish (e.g., tetras) prefer pH 6.0–7.0, while hard-water fish (e.g., mollies) need pH 7.5–8.5. Chronic pH stress weakens the immune system.
  • Swimming zone: Top dwellers (hatchetfish), mid dwellers (tetras), and bottom dwellers (corydoras) can coexist without competing for space, but two bottom dwellers may fight over the same territory.
  • Social needs: Schooling fish like neon tetras need groups of at least 6 to feel secure. A lone tetra becomes stressed and may hide or nip fins.

How to Use the Calculator Effectively

Start by listing the species you are considering. For each species, note its temperament (peaceful, semi-aggressive, aggressive), its preferred temperature range, and its adult size. Then enter the number of each species and the tank volume. The calculator will give you a score, but you should also read the warnings: if it says “potential conflicts�, look at which factor is causing the penalty – is it temperament, temperature, or tank size? Adjust your plan accordingly.

For example, if you want to keep angelfish (semi-aggressive) with neon tetras (peaceful), the calculator will penalize the temperament difference. In reality, angelfish may eat neon tetras once they grow large – so the warning is valid. A better choice would be to keep angelfish with larger peaceful fish like gouramis or rainbowfish.

Common Mistakes and Misconceptions

  • Mixing coldwater and tropical fish: Goldfish and tropical fish have different temperature needs. A heater set to 25°C will stress a goldfish, while a tank at 20°C will slow down a tropical fish’s metabolism.
  • Overstocking: Even peaceful fish produce waste. The general rule is 1 cm of adult fish per litre of water, but this varies by species and filtration. Overstocking leads to high ammonia and aggression.
  • Ignoring adult size: A baby oscar is cute and small, but it will grow to 30 cm and eat anything that fits in its mouth. Always research adult size before buying.
  • Assuming all tetras are peaceful: Serpae tetras and black skirt tetras are known fin nippers, especially when kept in small groups. They may harass slow-moving fish like angelfish.
  • Keeping two males of territorial species: Two male bettas, two male gouramis, or two male cichlids will often fight to the death. A single male with several females is usually safer.

Limits of the Calculator

This calculator is a general guide. It cannot account for individual fish personalities, tank layout (plants, rocks, hiding spots), or the presence of dither fish that can reduce aggression. For example, a semi-aggressive fish may be calm in a heavily planted tank but aggressive in a bare tank. Also, the calculator does not include water chemistry beyond temperature – pH and hardness are equally important. Use it as a starting point, then cross-check with a species-specific care guide or an experienced aquarist.

Frequently Asked Questions

Can I keep a betta with neon tetras?

It is risky. Bettas are semi-aggressive and may see the bright colours and flowing fins of neon tetras as a threat. Some bettas will ignore them, but others will attack. A larger tank (20+ gallons) with plenty of plants and hiding spots improves the odds, but there is no guarantee.

What fish can I keep with goldfish?

Goldfish are coldwater fish, so you need other coldwater species. Good tankmates include white cloud mountain minnows, zebra danios (if the tank is cool enough), and snails. Avoid tropical fish like tetras or guppies – they need warmer water.

How many fish can I put in a 20-gallon tank?

A common guideline is 1 inch of adult fish per gallon, but this is a rough estimate. For a 20-gallon (75 L) tank, you could keep about 20 cm of adult fish, but that depends on the species. A school of 6 neon tetras (3.5 cm each) plus a few corydoras (5 cm each) would be fine. Always consider the fish’s adult size and waste production.

Why are my fish fighting even though the calculator says they are compatible?

The calculator only looks at general temperament and water parameters. Individual fish have personalities, and stress from shipping, small tanks, or lack of hiding spots can trigger aggression. Also, breeding behaviour can make normally peaceful fish territorial. Check if you have two males of a territorial species, and add more plants or decorations to break lines of sight.

Is it safe to mix cichlids with other fish?

Most cichlids are aggressive, especially African cichlids from Lake Malawi. They are best kept in a species-only tank or with other large, robust fish that can hold their own. Some dwarf cichlids like apistogramma are more peaceful and can be kept with small tetras, but they still need a well-structured tank with caves.

What is the best way to introduce new fish to a tank?

Quarantine new fish for 2–4 weeks in a separate tank to avoid introducing diseases. Then float the bag in the main tank for 15 minutes to equalize temperature, and slowly add small amounts of tank water to the bag over 30–45 minutes to adjust pH and hardness. Release the fish gently, and keep the lights off for a few hours to reduce stress.

Related

Formula used
list species | Fish species | Guppy, Neon Tetra, Angelfish, Betta, Goldfish, Zebra Danio, Corydoras, Molly, Platy, Rainbowfish
sel temperament | Temperament | Peaceful=1, Semi-aggressive=2, Aggressive=3
in tank_size | Tank volume | L | 100 | 0
in temp | Water temperature | °C | 25 | 0
out score | Compatibility score | /100 | max(0, 100 - (temperament * 10) - abs(temp - 25) * 2 - (tank_size < 100 ? 15 : 0)) | 0
out warnings | Potential conflicts | - | (temperament >= 2 ? 1 : 0) + (tank_size < 100 ? 1 : 0) | 0

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.