How long was Rama in exile?

Rama was in exile for fourteen years. Queen Kaikeyi used one of her two boons to send him to the forest for that long. After the war in Lanka, when the fourteen years were over, Rama, Sita and Lakshmana flew home to Ayodhya, and Rama was crowned king.
Source: Valmiki Ramayana. Episodes found only in later retellings are marked as such.