We describe an algorithm for deciding whether or not a given finitely generated torsion-free nilpotent group is decomposable as the direct product of nontrivial subgroups.