Tetras · Nannostomus marginatus

Dwarf pencilfish care guide

Also called: Pygmy pencilfish, Nannostomus marginatus, Dwarf pencil fish

The dwarf pencilfish is a tiny, slim, timid South American fish with a gold stripe, kept in groups of 10 or more. It needs a calm, planted, soft and slightly acidic tank with gentle flow and quiet tank mates, and it eats tiny foods.

Dwarf pencilfish need a tank of at least 15 gallons (57 L), a group of 10 or more, and water at 24–27°C (75–81°F) with a pH of 6–7. They grow to about 3.5 cm (1.4 in) and are peaceful.

Plan a tank with dwarf pencilfishSee all tank mates

Dwarf pencilfish quick facts

Scientific nameNannostomus marginatus
FamilyLebiasinidae
OriginGuyana, Suriname and the Amazon basin, South America
Adult size3.5 cm (1.4 in)
Minimum tank15 gallons (57 L), at least 45 cm (18 in) long
Temperature24–27°C (75–81°F)
pH6–7
Hardness (GH)1–8 dGH
Group size10 or more (shoaling fish)
TemperamentPeaceful
Swims atMiddle
DietInsectivore
Care levelModerate
Lifespan3–5 years
Safe with shrimp?Mostly (eats baby shrimp)
Safe with plants?Yes

Tank setup

A group of 10 needs a tank at least 18 in (45 cm) long, and a 15 gallon (57 L) tank gives the group and its quiet tank mates more room. Use a dark substrate, dim light, floating plants and dense planting so the fish feel safe. Keep the filter flow gentle.

How many dwarf pencilfish in a tank?

The smallest common tank that suits dwarf pencilfish is a 15 gallon. Here is roughly how many fit in each size when they are the only fish, based on adult size and waste output. Leave room if you want tank mates.

TankDwarf pencilfish (alone)
3 gallonToo small
5 gallonToo small
10 gallonToo small
15 gallon10–24
20 gallon10–33
20 gallon long10–33
29 gallon10–48
40 gallon10–66
55 gallon10–91
75 gallon10–124
125 gallon10–208

What you need for dwarf pencilfish

Sized for a 15 gallon tank, the smallest common size that suits a group of 10 dwarf pencilfish. For a different tank or a mix of fish, use the stocking calculator for a list sized to your plan.

Tank and equipment

Food and extras for dwarf pencilfish

Product links go to Amazon search results. As an Amazon Associate we earn from qualifying purchases, at no extra cost to you. Disclosure.

Water parameters

Keep the water at 24-27 °C (75-81 °F), pH 6.0-7.0 and 1-8 dGH, with soft, stable conditions. Sources give wider ranges, but this narrower band is the safer long-term choice. Avoid swings in pH and temperature, and keep ammonia and nitrite at zero.

Best tank mates for dwarf pencilfish

These popular species share dwarf pencilfish' water needs and temperament. See the full list of 85 good matches.

Avoid keeping dwarf pencilfish with

  • Angelfish: Angelfish can eat dwarf pencilfish: they're small enough to fit in its mouth once it's grown.
  • Common goldfish: They need different temperatures: Dwarf pencilfish 24–27°C (75–81°F), common goldfish 15–22°C (59–72°F).
  • Fancy goldfish: They need different temperatures: Dwarf pencilfish 24–27°C (75–81°F), fancy goldfish 18–23°C (64–73°F).
  • Oscar: Oscar can eat dwarf pencilfish: they're small enough to fit in its mouth once it's grown.
  • Bala shark: Bala shark can eat dwarf pencilfish: they're small enough to fit in its mouth once it's grown.
  • Blue acara: Blue acara can eat dwarf pencilfish: they're small enough to fit in its mouth once it's grown.

Feeding

Dwarf pencilfish pick tiny animal prey from the water. Offer baby brine shrimp, daphnia and other small live or frozen foods often, with micro pellets or finely crushed flakes as a base. Feed small portions, because timid fish may hide and skip meals if the tank is busy.

Behavior

Very peaceful but shy, so they do best with similar-sized, calm fish such as small tetras, Boraras rasboras, corydoras, small plecos or kuhli loaches. Avoid boisterous or large tank mates, which make them hide and stop feeding. They also work as dither fish for dwarf cichlids.

Breeding

Spawning in a home tank is uncommon, though fry sometimes appear in a dense, mature planted tank. For a planned attempt, use a separate container with aged water and fine spawning mops, and remove the adults after 2 to 3 days. Feed the fry tiny foods such as infusoria, then baby brine shrimp.

Tips from experienced keepers

  • Keep at least 10. In small groups they hide and look pale.
  • Choose calm tank mates only. Busy fish crowd them out at feeding time.
  • Dark substrate, floating plants and dim light bring out their color.
  • Offer live or frozen food several times a week, not only dry food.

Frequently asked questions

What size tank do dwarf pencilfish need?

A tank at least 18 in (45 cm) long is the minimum, and 15 gallons (57 L) is a comfortable size for a group of 10. Sources give figures from about 10 gallons up, so more room is better.

What are good dwarf pencilfish tank mates?

Small, calm fish such as Boraras rasboras, small tetras, corydoras, small plecos and kuhli loaches. Avoid large, fast or boisterous fish, since pencilfish are shy and may stop eating.

How many dwarf pencilfish should I keep?

Keep at least 10, and more is better. In a large group they are bolder and show more natural behavior.

Sources

We checked these references when writing this page. Values are for healthy long-term keeping, not survival limits. Last reviewed 2026-10-19. See our editorial policy.