Dwarf pencilfish (Nannostomus marginatus)
One of the smallest aquarium fish, about 3 cm long, with three dark stripes and red fins. Keep ten or more in a mature, heavily planted soft-water tank with floating plants, a dark substrate and a lid. Feed tiny live and frozen foods plus crushed flakes.
Also known as: Gold dwarf pencilfish

Quick facts
- Temperature24–27 °C75–81 °FMedium confidence[1][2][3]
- pH5.5–7Medium confidence[1][2][3]
- General hardness (GH)1–8 dGH18–143 ppmMedium confidence[1][2]
- Adult size2.5–3.5 cm1–1.4 inMedium confidence[1][2][4]
- Minimum tank41 L11 US galMedium confidence[1][5]
- Minimum tank length45 cm18 inLow confidence[1]
- Minimum groupGroup of at least 10High confidence[1][2]
- TemperamentPeacefulHigh confidence[1][2][4]
- Swimming zoneMiddleMedium confidence[1][2]
- DietCarnivoreHigh confidence[1][2][5]
- Lifespan5 yearsLow confidence[3]
- DifficultyIntermediateMedium confidence[1][2]
- With shrimpCautionLow confidence[5]
- With snailsSafeLow confidence[1]
- With plantsSafeHigh confidence[1][2]
Values are from our sourced catalog; a human review of this page is in progress.
Where sources disagree
Our sources don't always agree. Here is where they differ and what we chose.
- Temperature: Seriously Fish 22-28 C; Fishkeeper 24-26 C; Aquariadise 24-27 C.
- pH: Seriously Fish 4.0-7.0; Fishkeeper 5.5-7.0; Aquariadise 4-6.
- General hardness (GH): Seriously Fish 1-10; Fishkeeper up to 8.
- Adult size: Seriously Fish 2.5 cm SL; Fishkeeper 3.5 cm; Aquariadise 2-2.5 cm; Imperial up to 1.5 in.
- Minimum tank: Seriously Fish base of 45 x 30 cm; Aquarium Co-op 10 gal minimum for pencilfish; Aquariadise prefers 20 gal or more.
- Minimum group: Seriously Fish advises 10 or more; Fishkeeper agrees.
- Temperament: Timid; best with other small, calm fish.
- Lifespan: Genus-level: Aquariadise says pencilfish usually live around 5 years, longer in ideal conditions.
Behaviour and tank mates
Good with
With conditions
- Amano shrimpDwarf pencilfish may eat or harass Amano shrimp; give dense cover.
- Boesemani rainbowfishDwarf pencilfish likes softer water than Boesemani rainbowfish; keep it near neutral (pH about 7), medium hard and steady, and choose captive-bred fish.
- Buenos Aires tetraWatch for chasing between Buenos Aires tetra and Dwarf pencilfish; add hiding places.
- Cherry shrimpDwarf pencilfish may eat or harass Cherry shrimp; give dense cover.
- Colombian tetraWatch for chasing between Colombian tetra and Dwarf pencilfish; add hiding places.
- GuppyDwarf pencilfish likes softer water than Guppy; keep it near neutral (pH about 7), medium hard and steady, and choose captive-bred fish.
Avoid
- AngelfishAngelfish can eat small fish like Dwarf pencilfish.
- AxolotlAxolotl needs 14–20 °C; your animals need 24–27 °C.
- Bala sharkBala shark can eat Dwarf pencilfish.
- Chinese algae eaterChinese algae eater can eat small fish like Dwarf pencilfish.
- Cobalt blue zebra cichlidCobalt blue zebra cichlid is aggressive and would harass Dwarf pencilfish.
- Common goldfishCommon goldfish is a coldwater animal; Dwarf pencilfish is tropical.
- Dojo loachDojo loach needs 18–23 °C; your animals need 24–27 °C.
- Endler's livebearerEndler's livebearer and Dwarf pencilfish need opposite water: soft and acidic versus hard and alkaline.
Computed by the same rules as Aquiio's Can I add?, for a typical tank: cycled, filtered and big enough for both species at their minimum group size. Your own tank can change the result.
Check it against your own tank
Tank and setup
| Water type | Tropical freshwater[1][2] |
|---|---|
| Flow | Low flow[1][2] |
| Substrate | Any substrate[1] |
| Decor | Dense plants, Floating plants, Driftwood, Leaf litter[1][2] |
| Special needs | Needs soft, acidic water, Needs plants, Needs low flow, Needs a mature tank, Jumper: needs a lid[1][2] |
| Active | By day[1] |
| Social structure | Group[1][2] |
| Schooling | Loose shoal[1] |
Feeding
| Foods | Flakes, Micro pellets, Frozen bloodworms, Frozen daphnia, Frozen brine shrimp, Live foods[1][2][5] |
|---|---|
| Feeding (adults) | 2-3 small meals daily, only what is eaten in a few minutes[6][7] |
| Feeding (juveniles) | several small meals daily[7] |
| Can go without food | 3 days[6][7] |
| Feeding zone | Midwater[1][5] |
Breeding and sexing
| Breeding | Egg scatterer[1][2] |
|---|---|
| Breeding difficulty | Hard[1][2] |
| Telling the sexes apart | Females are noticeably stockier; males brighten when breeding and in most forms have thickened anal-fin rays.[1][2] |
| Breeding notes | Use a soft, acidic (below pH 6) breeding tank with fine-leaved plants or marbles, dim light and an air-driven filter. Add one or more pairs; eggs are scattered a few at a time and the parents eat them, so remove adults straight after. Eggs hatch in 36-72 hours and fry swim 3-4 days later.[2][1] |
Never release aquarium animals or plants into the wild.
Look-alikes
- Barred pencilfish Nannostomus espei
- Coral red pencilfish Nannostomus mortenthaleri
- Golden pencilfish Nannostomus beckfordi
- Greenstripe pencilfish Nannostomus marilynae
- Hockeystick pencilfish Nannostomus eques
- One-lined pencilfish Nannostomus unifasciatus
Not sure which one you have? Identify it from a photo.
Frequently asked questions
What temperature does a Dwarf pencilfish need?
The Dwarf pencilfish does best at 24–27 °C (75–81 °F) and pH 5.5–7, based on the sources listed on this page.
What size tank does a Dwarf pencilfish need?
At least 41 L (about 11 US gallons) for adults in a group of 10. Bigger is easier to keep stable.
How long does a Dwarf pencilfish live?
Usually 5 years with good care.
How many Dwarf pencilfish should be kept together?
Keep at least 10 together; the species feels safer and shows natural behaviour in a group.
Can a Dwarf pencilfish live with a Black neon tetra?
Our rules rate Dwarf pencilfish with Black neon tetra as “Good match” for a typical tank.
Sources
- seriouslyfish.com/species/nannostomus-marginatus/
- fishkeeper.co.uk/fish/freshwater/characins/dwarf-pencilfish
- aquariadise.com/pencilfish/
- imperialtropicals.com/products/dwarf-pencilfish-nannostomus-marginatus
- aquariumcoop.com/blogs/aquarium/pencilfish
- buildyouraquarium.com/how-long-can-fish-go-without-food/
- aquariadise.com/how-long-can-fish-go-without-food/