If you were using an "OEM" install of Windows 7 on the computer, then most likely the driver came pre-installed from the manufacturer (Dell). You can check the Dell driver download website, or alternately, your OEM CD/DVD (that came with the unit), to try and find a power management or battery driver.
The current battery capacity and the total amount of battery capacity when fully charged are provided by the battery itself. You see, modern high-tech devices' batteries have built-in microprocessors (very small and low power) which keep track of battery statistics and, optionally, provide this information up into the operating system through a driver and a low-level interface. This interface is highly variable, and depends on device manufacturer; when it was manufactured; and the type of computer. There is no real standard (which has been widely adopted) as far as I am aware.
Once the battery firmware provides this information up to the CPU, the CPU's operating system (usually, through a driver) can perform various calculations with the "raw" data.
Battery percentage remaining is calculated by sampling the current remaining power (in watts, amperes, or volts, depending), and dividing it by the watts or volts that are experienced when the battery is fully charged. Note that the term "fully charged" can vary: some operating system drivers, and even some battery firmwares, are smart enough to intentionally lie about the maximum charge capacity, so that the battery does not constantly get charged up to a 100% level (doing this continuously with a unit that's always plugged into A/C power is a terrible thing for Lithium Ion or Lithium Polymer based batteries, which is most of the batteries in use on computers and mobile devices).
Battery runtime is usually calculated in software, by sampling the rate of battery consumption over a period of time and averaging it out to determine the rate of consumption. Given the rate of consumption and the maximum capacity, it is possible to calculate an estimated runtime remaining.
If the battery runtime is what you want, and it is not implemented in the Windows 8 drivers, you can still calculate battery runtime manually if you were able to figure out the driver interface to the battery. Obviously there is some interface going on, because your operating system knows what percentage of battery is remaining. The fact that it knows this, tells me that the "low level" component of the driver is already installed.
Now, accessing it from userspace programs in order to sample the watts of battery remaining and calculate the runtime can be tricky. Probably a question for StackOverflow.