When do Japanese people use keigo? (日本人はいつ敬語を使うのか?)

My foreign friend asked me “when do Japanese people use keigo?”. I think it's a good question, so I'm going to share my answer.

Oh ... Just now I found that there is no official grammatical word for casual way in Japanese. Tameguchi is a slang, but I'm going to use this word here. Just so you know, tame means the same age.

1. The most basic rule: you always have to use keigo to older people! Even if you have an older friend and the friend says “I don't mind if you use tameguchi” to you, I don’t know why but some of them get cranky if you really use tameguchi to them lol. Therefore, using a bit polite way (desu-masu chou) is safe. Since when can you really use tameguchi to your friends? Actually that's a difficult problem even for Japanese people.
1. 最も基本的なルール:年上には常に敬語を使わないといけません! もし年上の友達がいて、その友達が「タメ口でいいよ」と言ってきたとしても、なぜか分かりませんが一部の人は本当にタメ口を使うと不機嫌になります笑 なのでちょっと丁寧な言い方(です・ます調)を使うのが安全です。本当にタメ口を友達に使えるのはいつからか? 実は日本人にとってもこれは難しい問題です。

E.g. The politeness levels of the question "What kind of music do you usually listen to?" in Japanese.

普段どのような音楽をお聞きになるんですか? -> 敬語
普段どんな音楽を聞くんですか? -> です・ます調. It sounds polite enough in daily conversation.
普段どんな音楽を聞くの? -> タメ口

If you and your friend are very close in age, you can use tameguchi each other. But if the age gap is more than about 3 years and the younger person talks to the older one in tameguchi, it sounds a bit rude.

Just so you know, even 3rd grade students in elementary schools use keigo to 4th grade students! Some of them cannot use enough keigo yet though.
参考までに、小学3年生でさえ4年生に敬語を使います! 彼らの一部はまだ十分に敬語を使えませんけど。

2. In business situations, basically you always have to use keigo to your customers, the workers in other companies, and even your colleagues. Although, if you and the opponent belong to the same company, there are some exceptions.
2. ビジネスの場面では、お客さん、他社の人、そして同僚にも基本的に常に敬語を使う必要があります。ただし、あなたと相手が同じ会社に所属している場合にはいくつか例外があります。

2-1. A person who is in the higher position can use tameguchi to people who are in the lower position. Also if your positions are the same, you can use tameguchi each other. Of course you can also use keigo in these cases, but most of people use tameguchi.
2-1. 上の役職の人は下の役職の人達に対してタメ口を使えます。また役職が同じなら、互いにタメ口を使えます。もちろんこれらの場合でも敬語を使えますが、ほとんどの人はタメ口を使います。

2-2. If a person is in the lower position and is older than you ... many people use keigo to that person. Then you can see a scene or situation, where a manager and a low-grade employee talk with each other in this form. It’s up to them. Don’t forget, if you talk to a high-grade person, you must use keigo even if that person is much younger than you. If you use tameguchi ... you would be not fired right away because of that reason, but it definitely affects your career and comfort in your office.
2-2. もしある人があなたより下の役職であなたより年上だったら……多くの人はその人に敬語を使います。なのでマネージャーと下の役職の労働者が互いに敬語で話す場面や状況を見ることがあります。これは人それぞれです。でもお忘れなく、上の役職の人と話すときは、あなたよりはるかに年下であっても敬語を使わなければなりません。もしタメ口を使ったら……それが理由ですぐに解雇されることはないでしょうが、あなたのキャリアやオフィスでの居心地に確実に影響します。

These rules obviously show that age is a very important factor in Japanese society. That’s why Japanese people are sensitive to other people’s age.