Thoughts on an "average" Starfleet career.
This topic seems to be of perennial interest, and I truly respect the efforts of the fan community (or at least certain members of it) to try to keep realism in their fan-created works, and not to populate the universe with a lot of seven-year-old Admirals. :) To help in this endeavor, here is what I've culled from canon. Please feel free to criticize, comment, praise, or discuss.
Quote:
Aside: I will often below make reference to when a given character graduated the academy. In no case is this just idle speculation, but in some cases it is non-canon. Simply, I started with the timeline in the Encyclopedia, then added data from specific references in episodes. For instance, in one episode Janeway mentions high school and says it was "19 years ago". I took that to mean that she had been in high school at that point, but since she might have been a freshman or a senior on that date it gave me a window of 4 years or so for her age. Comparing that with subsequent quotes narrowed the field and I have, in fact, pinned down a lot of facts about the major characters in this way.
In the absence of any better clues, I assume characters entered Starfleet Academy at 18, and graduated 4 years later. Thus, graduation date can be deduced from birth date, if it is known.
First, it should be noted that the central characters of the various series tend to be fast risers. Some specatacularly so, but all of them are examples of people moving up through the ranks. In contrast, in "Tapestry" Jen-Luc Picard was presented with what he found a believeable scenario that had him still a Lieutenant after more than 40 years in Starfleet. And, even if you think Tuvok had to go back to Starfleet Academy when he rejoined (not entirely unreasonable, since he'd been gone for over 50 years), he was still a Lieutenant 18 years after he would have graduated (22 years after rejoining Starfleet). So certain people can get "parked" at a certain rank for a surprisingly long period of time.
How to get a leg-up on the competition: automatic rank or promotion.
Some people graduate from Starfleet Academy as Lieutenants. Jim Kirk's first post after the Academy was USS Farragut, and he was a Lieutenant there suggesting that he graduated as a Lieutenant not an Ensign. Saavik wore a Lieutenant's insignia (and was addressed as "Lieutenant Saavik", IIRC) while still a cadet. It has generally been assumed that this was a reward for being near the top of one's class: IIRC, Saavik was specificly stated to be the top of her class, and Kirk has at least been assumed to have been so.
However, we have some counter-evidence suggesting that this practice has been discontinued by the TNG era: Riker was eighth in his Academy class, and IIRC Harry Kim was actually first in his (either "Caretaker" or "Non Sequitor"), and both graduated as Ensigns.
In the modern US military, Doctors enter as O-3s, which would be a full Lieutenant. Lawyers and others with specialized degrees do the same, and it has long been assumed that the same is done in Starfleet for Doctors and Councelors at least.
Again, we have counter-examples: Dr. Julian Bashir was a Lieutenant Junior Grade at the end of his internship (when he first got posted to DS9), and Ezri Tegan was an Ensign as Assistant Councelor on USS Destiny, and became Counselor on DS9 (with a promotion) which shows she was fully qualified (unlike, say, and Orderly versus a Medical Doctor). So it seems likely that Deanna Troi entered Starfleet as an Ensign like everyone else.
The Fast Track: self-fulfilling prophecy.
Some officers rise almost meteoricly. Kirk, Picard, Riker, Janeway; all earned promotions at a rate that hardly seems reasonable. A big part of the reason for this is that, having earned some distinction early in their careers, they kept getting placed in a position to earn it again. As "the dependable lieutenant who successfully led that difficult Away Mission", each was more likely to be selected for difficult duties again.
Let's use Riker as our example, since we know a lot about his career:
In his first post out of the Academy, as a junior Conn officer on the Oberth class USS Pegasus, he defended the Captain against a mutiny that eventually drove them from the ship. This earned him a promotion, and marked him as a reliable officer.
Within a few years after that, he had earned another promotion, so he was a full Lieutenant when serving on Betazed.
Then, just a few weeks after taking a post on USS Potemkin, he was chose to lead a difficult away mission and was so valiant and self-sacrificing that he got promoted to Lieutenant Commander for it.
Within 2 years after that he had earned another promotion and became First Officer of USS Hood.
Finally, just 7 years after graduating from Starfleet Academy, he was offered his choice of First Officer on USS Enterprise under Jen-Luc Picard or a command of his own (USS Drake).
Being identified as on the "Fast Track" means an officer is more likely to be offered high-risk assignments, with a corresponding higher chance for the kind of glory that gets one promoted early.
What's an "average" career like?
When Lore asked Data what it would take to get a uniform like his, Data began an automatic reply: 4 years at the Academy, 3 years as an Ensign, 12 years "in the Lieutenant grades", ... and that's where Lore interrupted. Data was either describing a typical career or his own career, and possably both (more on that later). Interestingly, those numbers fit quite well: If Data was describing his own career, he was promoted to Lieutenant Commander in 2360, just 4 years before getting posted aboard USS Enterprise.
Stuck as an Ensign?
We don't really know a whole lot about the low men on Starfleet's totem pole: Riker was an Ensign for about 7 months before heroicly defending his Captain against mutineers earned him a promotion. Ro Laren had been an Ensign for about 2 years when her actions resulted in Court Martial and prison. And, of course, Harry Kim was an Ensign for almost 7 years, but his were very special circumstances.
Worf had been out of the Academy about 3 years when he was posted aboard USS Enterprise as a Lt.JG, so about 3 years seems pretty likely for when an Ensign can expect to become a Lieutenant, Junior Grade.
An ocean of Lieutenants.
Lieutenants are really the backbone of the Starfleet Officer corps: they are the ones who get the jobs done. Ensigns are trainee Lieutenants, and Commanders supervise Lieutenants, but the Lieutenants are everywhere doing everything. And some people seem destined to stay a lieutenant for the rest of their careers: Reg Barclay was already a Lieutenant in 2366 when he transferred to USS Enterprise, and was still a Lieutenant in 2377 with the Pathfinder Project. Picard found it plausable that he might have remained a Lieutenant 42 years after graduation.
If we take Data's comment about "12 years in the Lieutenant grades" to mean that promotion to full Lieutenant comes 6 years after making JG, and then LtCmdr comes 6 years after that, then Geordi makes full Lieutenant right on schedule. So, apparently, did Dr Bashir.
However, the just as many central characters who were Lieutenants made full Lieutenant in less than 9 years from graduation (3 as an ensign and 6 as a JG): Tasha Yar debuted as a full Lieutenant 5 years after graduation, Worf got promoted 4 years after graduation. Significantly, both of them had Picard pulling for them: Worf he wanted to replace Yar at Tactical (which likely required promotion), and Yar had performed heroic acts witnessed by Picard prior to his commanding USS Enterprise that caused him to specificly ask for her in his new command; those same acts probably brought commendation and promotion.
Jadzia Dax I do not have full information on: she was on schedule when she debuted as a JG 6 years out of the Academy, but within the next 4 she not only made full Lieutenant but also Lt Cmdr: if she made Lieutenant before Season 3, it was "early".
Graduates of Starfleet Medical seem to come out at Lieutenant Junior Grade. (That was Bashir's rank, and he was #2 in his class.) This makes sense when you consider they are also 6 years out of the Academy (4 in school and 2 as an Intern).
Commanders and above: Restricted versus Unrestricted Line officers.
In the US Military, promotion to O-4 (Lieutenant Commander) is accompanied by another kind of testing/evaluation: whether the officer in question is Restricted Line or Unrestricted Line. The difference is simple: Restricted Line officers are probably never going to get another promotion, and will be retiring after 20 years of service (or whenever they choose to leave, whichever comes first). Unrestricted Line officers may continue to recieve promotions, and may stay for up to 30 years (or even longer if they achieve Flag Rank - i.e. Admiral or above).
Granted, Starfleet lets people stay far longer than the US Military, due no doubt to the longer productive lifespans involved, but there is canon evidence to support the idea that only "special" people are selected to rise above Lieutenant Commander.
By Data's quote, promotion to Lieutenant Commander will come 15 years after graduation. Riker made it in 4. Geordi in 10, as did Jadzia Dax. Ben Sisko was a LtCmdr at Wolf 359 13 years after he graduated. Counselor Troi somehow made Lieutenant Commander in 5 years (or less!), as that was her insignia in the first season.
Riker made full Commander 5 years after graduation (assuming he served as XO of USS Hood as a Commander for a year before moving to USS Enterprise). Dr Crusher had made Commander within 18 years of graduaton, or within 12 years of leaving Starfleet Medical if you prefer. Troi made full Commander by passing the Bridge Officers' Exam 11 years after graduation. Sisko made Commander 15 years after graduation, and Captain 2 years after that.
Riker was first offered the Captain's chair 1 year after becoming a Commander, and was offered again the next year an the year after that.
Now for the big question: Do you have to be a Captain to command a starship?
Canon does not come down descisively on either side: DS9 covered that a Lieutenant Commander (Dax) would be addressed as "Captain" when in command of a ship, but the ship in question was really under the command of Captain Sisko, who had turned over command to a junior officer for a specific mission. Was the Defiant ever truly Worf's ship, or was it Sisko's ship on loan to Worf.
Since it is at least a valid interpretation that Sisko was the CO of USS Defiant, there is no inarguable canon evidence of Commanders or Lieutenant Commanders captaining Starfleet ships.
The question is relevant because there are at least 2 characters who we know have commanded ships, but they were not explicitly stated to have been Captains at the time: Picard and Janeway.
Picard was a Lieutenant (possably JG) and just 6 years out of the Academy when the Captain of USS Stargazer was killed and Picard took command and saved the ship. That Starfleet allowed him to remain in command (for 20 years, in fact) is canon, but his rank at the time is somewhat in doubt. The recent Stargazer novels have chosen to make him a Captain, and yet another holder of the title "Youngest ever to command a starship", which Kirk was at 31 and Captain Tryla Scott held as of 2364 when Picard identified her as such upon meeting her. For my money, USS Stargazer seemed like a fairly small ship, and bumping Picard 2 ranks to Commander seems more believeable.
(It's also worth noting that Picard was 28 when he assumed command of USS Stargazer. Riker was 29 when he turned down his first command, and 30 when he turned down his second, but he did seem to still think that becoming the Youngest Captain Ever was still an attainable goal, from his sheepish grin when Troi was talking to him.)
Similarly, we know that Tuvok first met Janeway in 2365 at the conclusion of her first starship command. At the time, Janeway had been out of the Academy just 7 years, so her having risen all the way to Captain is somewhat surprising (that's 5 promotions in 6 years, assuming a 1 year ship command). It seems more believable (to me at least) that Janeway was a Commander at that point. By the time she is seen to be a Captain, commanding USS Voyager, she has been out of the Academy 13 years.
Conclusions:
It seems like 3 years as an Ensign is pretty normal, followed by around 6 years in each of the Lieutenant grades. All of the Lieutenant Commanders we've seen were fast-risers of one sort or another (under the wing and watchful eye of an inflential Captain), except Data who has remained at Lieutenant Commander for about 17 years now. Will Riker, probably the extreme model for a fast-track officer, earned 5 promotions in 7 years (although he declined that last one).
Starship Captains seem to come in 2 versions: Extreme fast-track folks like Riker and Janeway, who just might be younger than some of their senior officers, or veterans who've been around forever and are on a first-name basis with most of the admiralty (since they all were in the Academy together) and have been in Starfleet longer than their senior officers have been alive. And occasionally, someone who is both (Picard). :)