A Swedish rail operator has vowed to name one of its trains "Trainy McTrainface" after a public vote, saying it would bring joy to people disappointed when Britain rejected the name Boaty McBoatface for a polar research ship following a similar poll.

Trainy McTrainface won 49 per cent of the votes in the naming competition, conducted online by train operator MTR Express and Swedish newspaper Metro, beating choices such as Hakan, Miriam and Poseidon.

"(This is) news that will be received with joy by many, not just in Sweden," MTR wrote in a statement.

The train will run between the Swedish capital Stockholm and Gothenburg, the country's second-biggest city.