It is a tough decision for consumer grade UPS units when they start having issues.
Most of them have a 3 year warranty.
If it lasted longer then consider yourself lucky
If you replace the battery and you still have issues.
Then you buy a new UPS that comes with a battery.
Then what to do with the new battery you just purchased.
They will go bad if not used very quickly.
So you waste your money..
Yes the 1500 va ups battery is like $40.00 at batteries plus.
And the new unit is $169.00
Is it worth the headache of trial and error?
Now if the UPS is say 4 years old then maybe it is a good decision to try just a battery..
If the UPS is still under warranty.
Good luck going through the hoops the manufacturer makes you do.
Most of them charge for shipping and then expect you to return the old battery at your cost for shipping.
For a $40 dollar battery.
So buying a new ups for $169.00 becomes viable versus trying to save a few dollars by just replacing the battery over the possible headache of a end of life UPS that still has issues.
Now if you purchase a large commercial UPS they normally do not come with batteries so replacing the batteries make sense.
Now for a 60 to 80 dollar UPS I would not bother with replacing the battery under warranty or not. I would just replace the UPS.