measure your battery before going to Autozone. Several different sizes are used in the Z4. I had to go back and get a different one because the first one was not wide enough.
They had two different size batteries listed.
2008 Space Gray Z4 3.0 si, Saddle Leather interior
2011 Nissan Frontier King Cab
2010 Lexus RX350