The energy math
A moving car carries kinetic energy KE = 0.5 x m x v squared, with v in meters per second. Braking to a stop releases all of it. The recovered energy is that amount times a round-trip efficiency covering the motor as generator, the inverter and battery charging, divided by 3600 to convert joules to watt hours.
Efficiency here is a single simplified number. In real cars it depends on how hard you brake, battery temperature and state of charge, and some energy always goes to air drag and rolling resistance while slowing.
Why it helps most in town
Each stop from city speeds only returns a modest amount, but stop and go traffic repeats it hundreds of times a day. Federal fuel economy data credits regenerative braking with a larger share of savings in city driving than on the highway. The range readout assumes about 170 Wh per kilometer.