Which episodes show the battle between Naruto with Madara and Tobi? I want to rewatch Naruto's fight with Madara but there are so many episodes and 20% of them are fillers.

Which episodes show the battle between Naruto with Madara and Tobi?
Naruto starts fighting with Madara during episode 392 of Shippuuden. 

This battle happens during the Birth of the Ten-Tails' Jinchūriki arc, which spans over the following episodes:


378 to 388
391 to 393
414 to 421 
424 to 427


Of these mentioned episodes, most are canon with the exception of the following, although some of these might still be worth watching as they do contain some canon content. Those are marked as such. (source): 


388 Mostly filler 
415 Mostly canon ← should watch this one 
416 Filler 
417 Mostly filler 
419 Mostly filler 
427 Filler