Are lawyers rolling in money? That seems to be the public perception. Lawyers on television are usually driving expensive sports cars and enjoying the view from penthouse residences. In reality, some attorneys make a substantial living, some are struggling financially, and most are part of the comfortable middle class.

The income earned by attorneys is a function of several factors, including geography, practice areas, experience and ability. It is affected by lifestyle choices and by whether the attorney has chosen a career in the public or private sector. Here are five things you should know about lawyer earnings.

1. Attorney Salaries Are Comfortable but Not Outrageous

The Bureau of Labor Statistics (BLS) conducts annual surveys to produce wage estimates for hundreds of occupations, including attorneys. The May 2016 survey found that lawyers nationwide have an median annual salary of $118,160. About 10% earn $56,910 or less, while another 10% earn $208,000 or more.

Wage statistics, however, do not tell the whole story. Not all lawyers earn a salary. Partners in law firms usually receive profit distributions that are not included in the BLS estimates. Sole practitioners and members of unincorporated partnerships may also take draws from business incomes that are not classified as wages.

However, using salary statistics as a basis for comparison, here's how the average salary earned by lawyers in 2016 compared to the average salaries for other kinds of work:

  • Surgeons: $252,910
  • Chief executives: $194,350
  • Marketing managers: $144,140
  • Airline pilots: $152,770
  • Physicists: $121,770
  • Civil engineers: $89,730
  • Computer programmers: $85,180
  • Secondary school teachers: $61,280
  • Social workers: $50,710
  • Carpenters: $48,340
  • Waiters/waitresses: $24,410

Lawyers generally have a J.D. (Juris Doctor) degree that requires three years of law school after they earn a bachelor’s degree. Their compensation is consistent with the compensation earned by other professionals with similarly specialized training, although it is generally higher than the earnings of workers who do not have a doctorate-level degree. Given the high cost of that education, attorney earnings are far from unreasonable.

2. Cost of Living Affects Lawyer Earnings

Income varies substantially by the location in which a lawyer practices. The two states with the highest concentration of lawyers, California and New York, also have a high cost of living. It's therefore not surprising that the average earnings for salaried lawyers in those states are higher than the nationwide average. The third-highest concentration of lawyers is in Florida, where salaries for lawyers are below the national average (mean).

The average salaries in the four states that have the most lawyers are:

  • California: $162,010
  • New York: $161,260
  • Florida: $131,990
  • Texas: $149,400

The District of Columbia has a large supply of lawyers in both the public and private sector. The average wage for a D.C. lawyer is $182,810, making it the top-paying location for attorneys. In addition to California and New York, another state where lawyer salaries are high is Delaware ($157,610). Not coincidentally, this state has a high concentration of large corporations.

The states with the lowest average attorney salaries are:

  • Montana: $74,930
  • Kentucky: $94,060
  • New Hampshire: $99,980

The lesson here is that lawyers, like other professionals, earn less when they choose to serve clients in states where the cost of living is more affordable.

3. Government Lawyers Earn Less but Have Better Job Security

Attorneys who work in the private sector tend to earn higher wages than those who work for the government. The BLS wage statistics for 2016 provide these annual earnings for government lawyers:

  • Federal: $135,840
  • State: $93,320
  • Local: $100,940

Although government lawyers tend to have lower salaries than lawyers in private practices, they often have excellent benefits packages and better job security.

For lawyers and everyone else, job security is important in a volatile economy. When the economy is bad, law firms are just as likely to lay off associates as assembly plants are to lay off production workers. To gain job security and for the chance to provide a public service, government jobs are appealing to many lawyers, even if the pay is lower.

4. Some Practice Areas Are More Lucrative than Others

The kind of law that an attorney practices often has a substantial impact on the attorney’s income. Attorneys who do public interest law, handle consumer cases, or work for nonprofit organizations usually sacrifice income for the satisfaction of helping the underprivileged.

Lawyers who maintain a general practice in small firms usually earn a comfortable middle-class income. On the other hand, attorneys who practice corporate law in large firms that serve Fortune 500 companies generally have healthier-than-average incomes.

Sometimes, a practice area will be lucrative for some lawyers but not for others. Experience and ability are critical factors that influence the incomes that lawyers earn. Criminal defense, family law, real estate and probate law provide bread-and-butter incomes for many small firm lawyers and sole practitioners. Lawyers who concentrate in those areas and earn reputations for success can achieve above-average incomes, but it usually takes years of experience and a track record of achievement before those practice areas allow a lawyer to charge above-average fees.

Representing plaintiffs in personal injury and medical malpractice cases can produce a substantial income if the lawyer attracts cases that produce large damages awards, but the field is competitive. Most personal injury lawyers handle average cases that settle for $10,000 or less. The lawyer will earn a percentage of that recovery. Most of those earnings will be used to pay rent, insurance, support staff and other overhead expenses. Again, however, an experienced lawyer who has a reputation for winning may be able to attract the kind of cases that produce six or seven-figure settlements and verdicts.

5. Lifestyles Affect Earnings

Money isn’t everything. Associates at large firms who manage to bill corporate clients 2,000 hours a year can earn substantial salaries, but they risk burning out before they become a partner. Some lawyers prefer to live a more relaxing life. They might keep overhead low by working from their homes while caring for their children. They might work part time. Many lawyers make an active effort to balance work-life and personal interests.

Some firms work to create a culture that emphasizes quality of life. Those firms believe that happier lawyers make better lawyers, even if happiness comes at a sacrifice of profits. How individual lawyers choose to balance work and family often has a great impact on both their income and the satisfaction that they derive from their work.