It takes as long as it takes. Perhaps that seems like a vague answer, but it's also honest and realistic. Every story has its own journey to being fully realized and every writer has her own process. To quantify how long it should take for all those elements to come together for every author on every story would be impossible.
In my own writing, I've found some stories need time to percolate and solutions to problems aren't always timely. But when the story is finished, I'm usually glad I hung in there. Other stories arrive close to whole on the page in the first few drafts.
Tobias Woolf had this to say about how long it took him to write his short story “Benefit of the Doubt":
That probably took me three months, working on it most days for some hours. It took a while to figure out where it was going. If a story ends up fulfilling the design that was in my mind when I first sat down, it never seems to have much kick. I have to be shaken out of my intentions as I work; I'm always very pleased when something suggests itself that makes me do that.
Try not to focus on the clock or the calendar. Let the writing of the story take its own natural course. Be open to the possibilities that come with being shaken out of your intentions, even if that means a more significant time investment in the story. Great stories are created in the deep exploration of the characterization, form and grace of that particular story, which may happen at the pace of a swiftly run race or a slow walk on a meandering path.