If we talk about small AA, AAA and coin batteries (both 1.5V and lithium 3V), then the simplest estimation can be made using a voltmeter. The voltage goes down (declines) over time and usage.
Note that each particular device needs a different minimum voltage to operate normally, so for example a battery from one device which seems dead can be put somewhere else and operate normally (at least for a little while). For example my digital weigh is quite demanding - it ceases operation already when the voltage drops to 2.88 V, and those lithium batteries are still well usable in bicycle computer or somewhere else.
Update: Note that alkaline batteries have got some kind of self-healing effect. When they are not used for a while, their voltage goes a bit higher. This can mislead your voltage measurements. So you should put them back to some load for a few seconds and then you can see their real health. Also note that totally dead batteries don't need this; they show voltage near to zero even without any load.