30 days if you do NaNoWriMo.
Jack Kerouac wrote On The Road in under a month (though he'd made previous attempts). Bukowski did Post Office in a little over a fortnight. And I think I read somewhere that George Simenon could produce a book a week.
Richard Ford's latest, though - Canada - apparently took 20 years. In an interview, he says he wrote the first 20 pages in 1992 - then put it and all his notes in the freezer compartment of his fridge! At that point, he knew the title, and knew it was about a boy crossing the border of the US into Canada, but "I didn't know why he was going there. I didn't know why two parents would have abandoned him."
Over the next 20 years, he'd from time to time "get a little idea about how a person would get into that situation, and write it down and add it to the envelope in the freezer."
The book was finally published last month, to huge acclaim. I like his fiction - especially the short stories - so I look forward to getting hold of it.
Ford added in the interview: "Writing never came naturally, and I still have to force my hand to do it."
Gives us all a little hope, perhaps!