There was no way that I was going to spend $170 for a 12-volt battery for my 2004 Prius, so I went to the local battery store and bought a 5-year Size 51 battery for $59.95. Don't get a 51R; the R means terminals reversed. I went to the local Wal-Mart and bought a pair of marine terminals for it that have threaded posts and a butterfly nut on each one. That set me back another $2.94. Removal and installation took about 45 minutes, requiring only a 10 and 12 mm socket and a 5/16" drill.
1. Remove the rear trunk cover and tray as if you were going to take out the spare tire.
2. Remove the black air duct that goes over the battery. Two 10mm bolts, the one in the fender is self-threading.
3. Remove the negative ground cable from the battery and the back frame (10mm)
4. Remove the 12mm bolt and 10mm bolt that hold the black box down so you can push it aside a little.
5. Remove the 10mm nut and 10mm bolt that hold the battery clamp-down bracket.
6. Remove the positive battery clamp.
7. Lift out the battery.
8. Attach the marine terminals to the new battery, with the butterfly nuts removed.1/2-inch socket.
9. Remove the ground cable clamp nut and bolt and spread the clamp apart. Enlarge the clamp hole to 5/16"
10. Put the new battery in place of the old one, with the terminals in the same relative position.
11. Replace the battery clamp-down bracket.
12. Replace the air duct
13. Put the positive cable assembly over the positive terminal post and tighten the butterfly nut on it.
14. Put the negative ground cable 5/16" hole over the negative terminal post and tighten the frame bolt, then the butterfly nut.
15. Put the black box back and tighten it down.
16. Check all fasteners for tightness.
16. Replace tool tray and trunk floor.
For a more elaborate fix (not completed yet) saw the tops of the two terminals off the old battery off the tops until you can see the steel posts inside the lead. Saw off the terminals from the old battery. Push the steel posts out of the terminals. Run a 5/16-18 tap thru the holes (if that is what the marine terminals have). Be aware that the two terminals have different diameters. Thread the posts onto the marine terminals. Do not do Step 9, Modify Step 13 and 14 to just replacing the factory battery cable clamps over the old posts, which are now secure on the marine terminals.