We know that there are two people who claim to be Madara. The first is Tobi, who claimed to be Madara then gave up that joke and now says he can be called Tobi because he is nobody. The second is Edo Madara, who is definitely the "real" Madara who has obviously died and been resurrected. Some comparisons:
Edo Madara: Has EMS and Rinnegan, and has never hidden their use since he appeared on the battlefield. Clear high mastery of Rinnegan and EMS techniques, along with mastery of massive fire jutsus. He has used all these things in battle. Apparently still has some kind of summoning contract with Kurama. Has never used space/time techniques as far as we know. Has typically been seen with long hair.
Tobi: Originally had sharingan, but has never displayed use of MS, EMS or rinnegan (until he implanted Nagato's rinnegan). Despite the fact that he did not previously seem to have them, he has a very high level of knowledge about MS, EMS and Rinnegan. Has space/time techniques of the highest level, which are his primary tool of battle. If he had a summoning contract with Kurama, he lost it when Minato used the contract seal. Has typically been seen with short hair.
Now let's look at all the times and places where somebody has appeared who claimed to be Madara, and try to figure out who each one was:
1) Battle against Hashirama: Tobi claims to have fought Hashirama, but that was probably a lie. The only way Tobi could have been there too is if he is a clone or copy of Madara. This Madara had a familiar set of EMS techniques, and there has been no mention of high level Space/Time techniques being used. This was the real Madara.
2) Giving Rinnegan to Nagato: Edo Madara knew Nagato and knew that Nagato had the Rinnegan. This suggests he was at least present at the time. He also must have had the Rinnegan at this point, which he claimed was shorly before his own death. Tobi could have been here also, to help with the eye transfer, but the Real Madara was probably the key figure here.
3) As the "secret" Mizukage: This one is up for grabs. We see sharingan but never see EMS or Rinnegan. We also don't see any Jutsu except genjutsu. Kisame later recognises this person as Tobi, so it was probably Tobi (or else Tobi is a clone/copy of Madara and looks exactly the same).
4) Helping Nagato to create Akatsuki: This one is also up for grabs. We haven't actually seen this event in the manga, so it's possible to be either. I suspect by this point Madara was already dead so I *think* this was Tobi.
5) Fighting Minato and Killing Kushina: He used space/time techniques only, never showed an EMS or a Rinnegan and never used techniques from either of those. However, he did have a level of knowledge about the fox, the jinchuuriki and the secret village security protocols and Minato thought it only could have been Madara. This was probably Tobi, but this suggests Tobi gained a lot of knowledge from Madara, and was probably either a clone, a copy, or a very close accomplice.
6) Helped Itachi during the Uchiha Massacre: Itachi talks about Madara as being a master user of the sharingan, MS and EMS. This suggests that the "real" Madara participated in the massacre. If he used MS and EMS techniques which Itachi would have recognized, and didn't use Space/Time techniques that Itachi never mentioned to Sasuke, it seems like the real Madara. However, this raises several complications because we assumed Madara would have been dead before this point. Also, "Madara" here was wearing Tobi's mask, the same one he wore in the fight against Minato. We can't say for certain, but the fact that Itachi thought this was the real Madara, and that he must have used a move set similar to what Madara had, suggests this was probably the real Madara. Remember, Itachi tried to kill Tobi with Amaterasu after his death. But Tobi was able to avoid that attack by using an unknown technique that Itachi did not know about. If this was the space/time technique, that means Itachi never saw that. If it was something else, then Itachi didn't know about it.
7) Talking to Pain and Konan, prior to the invasion of Konoha: Again, Pain and Konan recognize him and probably recognized him as Tobi when he joined as Deidara's partner. If Nagato and Konan are taking orders and acting respectful towards Tobi, this suggests that he was the same person who helped them create Akatsuki, Which means it was Tobi in point #4 above too.
8) All appearances of "Tobi" in Akatsuki: Clearly this is tobi
9) The masked man, during the war: Clearly this is tobi
10) Edo Madara, as summoned by Kabuto: Clearly this is the original Madara, and clearly the original Madara died at some point.
This is my best guess, using the information we have in the manga. By this, it looks like the real Madara must have died sometime between #2 and #4, although that means the person who helped with the Uchiha massacre isn't obvious. If Madara was dead, the person at the massacre must have been Tobi, which means he must have displayed abilities to Itachi to convince him that he was actually Madara (MS/EMS techniques, specifically).