The Lord of the Rings, form the very first word of Fellowship to the very last word of Return of the King, takes place over 18 years and 4 months. How it takes place:
Bilbo leaves the Shire
17 years and 5 months pass
Gandalf arrives back in Hobbiton in April of the 17th year, then the rest of the story takes place, spanning 11 months