Depends upon the nature of the story and genre.
It depends upon how much homework & research I gotta do for details.
Two lovers in a dramedy set in "the big city" working at generic occupations in generic situations doesn't require as much attention to environmental detail as a international manhunt across jurisdictions, national & international laws, hardware, software, maps, transportation modes, etc.
Could be weeks.
Probably the better part of a year.
Likely not over a year.
And that's for a completed feature.
Assuming you're a normal person with a paying job and general household/family/social demands you should be able to chop out the first draft in a few weeks to three months.
Then you go back and forth over it, constantly, modifying the pace and story structure to bend it "the way it should go." You'll probably do that for another few months.
Then you have people that know WTH they're looking at read it, provide feedback, rewrite, resubmit, get feedback, rewrite, go for a third beating or call it a day. Done.
Doesn't matter a whole lot.
What you write and what gets in the final cut are distant cousins of each other, even if you're the writer/director.
Budget's gonna change stuff.
Producer's gonna change stuff.
Locations are gonna change stuff.
Actors are gonna have eight ways to deliver your lines.
The editor's gonna select the takes that work best.
You'll edit for timing and pace.
Watch DVD/BR director/producer/actor/writer commentaries and see how much gets changed from script to screen.
Two I can recommend the most are Salt & The Expendables.
http://en.wikipedia.org/wiki/Salt_(2010_film)#Production
http://en.wikipedia.org/wiki/The_Expendables_(2010_film)#Development
Write "good bones" to the story, because all the fine details are subject to change.
