By Daniel Bukszpan, CNBC.com
Movies have glamorized many occupations over the years. The films of Humphrey Bogart let viewers live vicariously as street-smart private eyes. James Bond made audience members imagine themselves as debonair, globe-hopping spies with exotic seductresses in every port of call. And Clint Eastwood's westerns made people visualize themselves as the frontier's messengers of bloody vengeance.
What these films failed to do was accurately convey a picture of their main characters' day-to-day finances. Was James Bond paid enough to afford all that Beluga caviar, or did he have to expense it? Did Sam Spade earn enough to cover what he spent every day on cigarettes? How many people did "The Man with No Name" have to kill to collect enough bounty to buy his poncho? The movies never answered these questions.
See the Slideshow: Movie Fantasy Jobs
CNBC.com looked at several contemporary films and considered how their main characters made their living. Using data from the Bureau of Labor Statistics and job search sites such as Indeed.com, we determined what the characters' actual salaries would be in real life, and then tried to determine if they could really afford to live in that apartment, drive that car, or eat at that restaurant.
Which movies had main characters that lived within their onscreen means, and which depicted unrealistic fantasies?
Left: Twentieth Century Fox | Right: Stephen Brashear | Getty Images "Office Space"
Average salary for a computer programmer: $71,380
In the 1999 film "Office Space," Ron Livingston plays a disgruntled computer programmer. Although the movie didn't do much at the box office, it endures as a cult classic, thanks to its hilarious dialogue and one-liners.
"Office Space" realistically depicts its main character's financial situation. Computer programmers earn a mean annual salary of $71,380, according to the Bureau of Labor Statistics, which is enough to comfortably afford the monthly rent on his one-bedroom apartment, the payments on his midsize car, and the regular dry cleaning of his shirts, slacks, and ties.
Left: HBO | Right: Carlo Herman | AFP | Getty Images"Sex and the City"
Average salary for a writer: N/A
"Sex and the City" is a 2008 movie based on the popular HBO series of the same name. It stars Sarah Jessica Parker as Carrie Bradshaw, published author and writer at Vogue magazine. She owns a brownstone on Manhattan's Upper East Side and has an insatiable appetite for expensive designer shoes.
Almost any writer will be only too happy to state that this depiction of a writer's lifestyle is wildly inaccurate. In fact, even "Sex and the City" author Candace Bushnell can confirm that she spent many years in a state of abject poverty, including one year in which she earned all of $8,000. For the majority of writers, the financial situation depicted in this film is pure fantasy.
Left: Fox 2000 Pictures | Right: Juan Manuel Silva"The Devil Wears Prada"
Average salary for a personal assistant: $39,000
The 2006 movie "The Devil Wears Prada" stars Meryl Streep as a tyrannical fashion magazine editor. Her personal assistant is played by Anne Hathaway, and she endures multiple indignities while trying to fulfill her employer's completely unreasonable demands.
The average salary for a personal assistant is $39,000, according to the job search site Indeed.com. The exterior of the character's apartment was shot on Manhattan's Lower East Side, where cheap rents can still be found, so someone on that salary who lives with a gainfully employed boyfriend could afford to live there. The character also "shops" for her pricey, fashionable wardrobe in Vogue's sample closet - for free.
Left: Columbia/Tristar | Right: Huntstock | Getty Images"The Cable Guy"
Average salary for a cable installer: $34,000
The 1996 movie "The Cable Guy" stars Jim Carrey as a mentally unbalanced cable installer. He becomes uncomfortably chummy with a customer played by Matthew Broderick, and his efforts to foster camaraderie include taking Broderick to the Medieval Times dinner theater.
Real-life cable installers make an average annual salary of $34,000, according to the job search site Indeed.com. Dinner for two in good seats costs $128.30 at the Lyndhurst, N.J., Medieval Times location, according to Ricardo Salazar, the theater's marketing and sales director. That's a prohibitively high price to pay for someone whose weekly gross income is a mere $654.
See the REAL Salaries of Your Favorite Movie Characters
More from CNBC:
Odd Jobs of Celebrity Entourages
10 of the World's Coolest Jobs
By Daniel Bukszpan, CNBC.com