1) If water heater is leaking, I suggest you protect yourself first.http://waterheatertimer.org/Emergency-steps-for-leaking-water-heater.html
2) You have to do some work to find out if tank is under warranty.
-Contact manufacturer: http://waterheatertimer.org/Water-heater-manufacturers.html
-Contact installer: If plumber installed heater, then installer backs warranty for some manufacturers. If you installed heater, then warranty is less or void
-Look at paperwork and manual that came with water heater and read about warranty coverage
-Look at markings on tank to see if tank is 6 year, 15 year etc
-Warranty is based on date of manufacture: To find date of water heater, look at serial number located on label on side of tank:
Open link below for serial number decoder by manufacturer.http://waterheatertimer.org/pdf/WaterHeaterSerialNumberDecoder.pdf
3) If tank is older than 6 years, and tank label shows this is a 6-year tank, then tank is no longer under warranty.
If you have a lifetime tank, then warranty is in effect, so contact manufacturer.
Open following link to see troubleshoot checklist for leaking water heater:http://waterheatertimer.org/Leaking-water-heater.html
Other things to consider:
-If tank rusted out after a few years and installer did not install a jumper wire between hot and cold pipes, then tank warranty will probably not cover tank.
-If tank rusted out and you have water softener, and did not inspect anode rod or maintain water heater, then you did not read manual or maintain heater, and warranty might not cover problem.
-I suggest you read water heater manual cover to cover so water heater will not start leaking.
Other useful links:http://waterheatertimer.org/Clean-sediment-out-of-water-heater.htmlhttp://waterheatertimer.org/Replace-anode-rod.htmlhttp://waterheatertimer.org/9-ways-to-save-with-water-heater.html