Recently, we as a group stumbled upon a question,
"Historically, which event happened first - the Ramayana or the Mahabharata"?
Ramayana happened before Mahabharata.
Some of the characters like Jambavana and Shri Hanuman are referred in Mahabharata with their Ramayana backdrop. Even Shri ParashuRama is also referred who is said to born even before Ramayana.
During discourse of Bhagavad Gita to Arjuna, Lord Krishna refers himself as Shri Rama as below:
Of puriﬁers I am the wind, of the wielders of weapons I am Rāma, of ﬁshes I am the shark, and of ﬂowing rivers I am the Ganges.
Now "Parashu Rama" is also referred as "Rama" at many places in Mahabharata, however in this particular case I believe wielder of weapon is emphasizing on Kshatriya ability and hence it's more likely to be Shri Rama.
Regarding Mahabharata majority of the people believe it to be happened nearly 5000 years ago. There is also a research on ancient Dwarka city's remains under water.
There are some other answers which suggest, Ramayana happening many more thousands years ahead of Mahabharata. To me that seems highly unrealistic and extremely less likely. Putting that question for your reference:
Ramayana happened before Mahabharat
Ramayana is story of Ram son of King Dashrath and who is seventh incarnation(avataar) of Lord Vishnu where as Mahabharat contains moments of Krishna's life who is son of Vasudev and who is eightth incarnation(avataar) of Lord Vishnu so clearly Ramayana happened before Mahabharat