The algorithm used takes into account CPU cycles, screen brightness, inputs, and power draw on external ports, as well as a few other factors. As these change, it recalculates and gives you another time.
If you put your screen as dim as it can go and still see the time, you can get almost a day out of it on a core 2 duo running Leopard. It's not until you raise it back up and start using it that it drops to 4 hours or so.
The best way to tell is to prepare to use it for an entire day. Give it a full charge and wait 2 hours to condition the battery. Then remove the charger, power it up, and start your clock. Once booted, record the estimated time.
Then as your laptop is about to shut off, compare the stop watch to the estimated time you wrote.