The batteries in modern hybrids are designed to last for at least 100,000 miles. Some might even make it to 150,000 or more. If you're the original owner of a hybrid vehicle, chances are you won't ever have to replace the battery pack because it just wears out.
That said, hybrid batteries aren't immune to the laws of nature. Just like any other car part, they can unexpectedly fail. That's why automakers provide lengthy warranties. The battery pack in the Toyota Prius is guaranteed for 100,000 miles. Honda and Ford stand behind theirs for 80,000 miles. It's safe to say that replacement is a rare event.
If you're faced with replacing the battery on an out-of-warranty car, there's no need to panic. The cost of a new battery pack continues to decline and now stands at about $3,000, not bad when you consider how long they last. A used pack salvaged from a wrecked vehicle will set you back around $1,000.
Battery replacement should be left to professionals. There are strict regulations for the handling and disposal of old batteries, which can leak hazardous materials. In fact, very few third-party mechanics are qualified to tackle the job. Almost all replacements are performed by dealers, who have the experience and know-how to do it the right way. New dealer-installed batteries come with full warranties, so you may be covered for the remainder of your ownership.
While there are many theories about how to make batteries last longer (coasting, slow takeoffs, etc.), they haven't been shown to actually extend battery life and are impractical anyway. Simply maintaining your vehicle as recommended is the best way to ensure your battery stays healthy for as long as possible.
When do you know it's time for a new battery? Your car will tell you. The gas engine will run almost constantly and your fuel economy will take a noticeable hit. While your car may run for some time on a bum battery, its performance and efficiency will steadily decline until it's replaced.