Can rainbow sharks live with swordtails?

Verdict
Yes

Yes. Rainbow sharks and swordtails get along in the same tank. Both are fine at 72–79°F. Plan on at least 55 gal.

Why it works

Water side by side

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

Size to scale

Rainbow shark · 6 inSwordtail · 5 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 sharkSwordtail
Temperature72–80 °F72–79 °F
pH6.5–7.57–8.3
Adult size6.0 in5.0 in
Minimum tank55 gal30 gal
TemperamentSemi-aggressiveSemi-aggressive
Swims atBottomMiddle
GroupOne per tankGroups of 3+
DietOmnivoreOmnivore

Better tank mates for rainbow sharks

All rainbow shark tank mates

Better tank mates for swordtails

All swordtail tank mates

Questions

Can rainbow sharks live with swordtails?

Yes. Rainbow sharks and swordtails get along in the same tank. Both are fine at 72–79°F. Plan on at least 55 gal.

What temperature suits both rainbow sharks and swordtails?

72–79 °F. Rainbow sharks need 72–80 °F, swordtails need 72–79 °F.

What size tank do rainbow sharks and swordtails need together?

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