8 years or 160,000 km (whichever comes first) for 70% of battery capacity.
The battery lasts the longest when the Model 3 is only 80% - 90% charged in everyday use.
tesla.com - vehicle warranty