Can rainbow sharks live with pencilfish?

Verdict
Yes

Yes. Rainbow sharks and pencilfish make a good pair. Both are fine at 75–80°F. Plan on at least 55 gal.

Why it works

Water side by side

55°60°65°70°75°80°85°90°Both: 75–80°Rainbow shark 72–80°Pencilfish 75–82°
The green band is the temperature range both can live in.
456789Both: 6.5–7.5Rainbow shark 6.5–7.5Pencilfish 5–7.5
The green band is the pH both tolerate.

Size to scale

Rainbow shark · 6 inPencilfish · 2 in0"1"2"3"4"5"6"
Adult length in an aquarium. A fish can swallow anything that fits in its mouth, roughly a third to half its own length for predators.

Care at a glance

Rainbow sharkPencilfish
Temperature72–80 °F75–82 °F
pH6.5–7.55–7.5
Adult size6.0 in2.0 in
Minimum tank55 gal15 gal
TemperamentSemi-aggressivePeaceful
Swims atBottomMiddle
GroupOne per tankGroups of 6+
DietOmnivoreOmnivore

Better tank mates for rainbow sharks

All rainbow shark tank mates

Better tank mates for pencilfish

All pencilfish tank mates

Questions

Can rainbow sharks live with pencilfish?

Yes. Rainbow sharks and pencilfish make a good pair. Both are fine at 75–80°F. Plan on at least 55 gal.

What temperature suits both rainbow sharks and pencilfish?

75–80 °F. Rainbow sharks need 72–80 °F, pencilfish need 75–82 °F.

What size tank do rainbow sharks and pencilfish need together?

At least 55 gal, set by the rainbow shark. Add space for each extra fish.