This does depend on your device. Motorola phones can only display remaining battery in increments of 10 (until you get below 20%), as the power manager can only return a limited set of values (100, 90, 80, 70, 60, 50, 40, 30, 20, 15, 10, 5). Some apps (like Battstat, mentioned above) work around this by comparing battery voltage history to battery percentage history and estimating the values in between, but as lex said, this isn't necessarily any more accurate than the value being returned by the power manager.
Of course, if you have an HTC phone, then the link 4fit posted will work. It won't do you any good with a Motorola phone, though.