You don't provide a link to the item, so the information you provide is the only basis to consider the question. I have not heard of a power tool that runs on 40V - and you aren't saying if it's AC or DC. With so little information, take this discussion with a healthy helping of salt.
Watts = Volts x Amps. Accepting your provided numbers, the tool will draw a maximum of 30 Amps. 20Ah is a measure of maximum capacity, but doesn't define maximum current.
'1500w' is more of a general statement, although it may be correct - it means the seller says the battery can handle a motor that draws that at peak. Using the number at face value means that the battery can supply 1500W/48V = 31.25Amps.
Nominally, the battery can supply the current, but the input details are too vague to rely on. When I shop for a battery, I look at the value of Amps it's stated to supply - this ranges from 25A to 40A from the supplier I buy from. The circuitry in the battery may shut down the battery (to keep it from catching fire and exploding) if I exceed the limit it's built for.
There is also the question of duty cycle - can the battery supply 30Amps for how long? Some can continuously - I would want a comfortable margin on all the ratings involved.
And what sort of power? That's the AC or DC question, although I've never encountered 40V AC. The idea of running my house from an EV is catching on, and that's exactly what I'm planning to do with my electric bicycle - although I won't be running an air conditioner or a refrigerator that way. But modest power tools are in reach - I just need to provide the volts and amps required with enough of a margin that I don't burn my battery out prematurely. Batteries are very expensive.
For a Li-ion battery, keeping the charge between 20% & ~85% will triple (at least) the charge cycles, which both saves much $$ and also greatly reduces the possibility of fire or explosion, which is becoming an obvious hazard.
My own plan is to use a DC-DC converter to bring the voltage down to the 18V or so my own power tools will use. I haven't attempted a use as close to the limits as you are suggesting, so I can't comment directly, but perhaps some of the numbers above will give you something to consider.
And it will be very interesting if someone else can say they've done this, or something like it. Can you link to the tool, so we can (hopefully) read more details?