That depends specifically on the motor and the application.
Check the motor datasheet and see what the current draw is on it. If you are lucky, the datasheet will give a chart that compares torque vs current vs voltage.
From experience, 40A will probably be fine.
Try not to use motors above 12V because finding good/small batteries starts to become difficult.