Particles like で, に, を, は are some of the most difficult grammar points for Japanese learners.
Many Japanese learners in upper levels still get confused about how to use particles correctly. But you don't have to be too worried.
The key to understand particles is to grasp the concept of each particle.
Let’s understand the basic concept of で (de) and use it like a native Japanese.
で (de) particle
で (de) is one of the basic Japanese particles and is mainly used for four types of expressions.
The basic concept of the で (de) particle is “a boundary.”
It doesn’t mean that Japanese people are making boundaries in their heads every time they use a で(de) particle. But the boundary image is key to understand the で(de) particle.
The で(de) particle has four usages. One is a place, second is means and use, third is amount, and fourth is time and period. Let’s look at some examples!
The で(de) particle can be used for describing the place where you do something. The grammar is as follows:
Your action is done within the boundary.
For example, when you want to say “I’ll play at the park with friends,” you say 友達と公園で遊ぶ.
The park is chosen for the place of action and is in the boundary that is separate from other places.
When you say you’ll sleep in a bed, you say ベッドで寝る. Your action “sleeping” is done in a bed (boundary).
ベッド : bed
寝る（ねる）: to sleep
Play at the park with friends
Sleep in a bed
Study in a library
You can't use で with the existence verb いる or ある because いる or ある express a state.
For example, you can't say ベッドでいる. It means "You are being a bed." Weird, right?
If you want to say you are in a bed, you can say ベッドにいる.
手段・方法 means and use
The second role of the で(de) particle is to describe means and use. You can specify what you use for the action. When you use the で (de) particle, the grammar is:
For example, when you want to say, “I’ll go to school by bicycle,” you say 自転車で学校に行く.
The idea is that the bicycle is in the boundary that separates from other transportations, like the picture as follows.
You can also use this for speaking languages because the language is the means you are using to speak. For example, “I speak in Japanese” is 日本語で話す. The で (de) particle means that you speaking in Japanese and not any other language.
行く（いく）: to go
話す（はなす）: to speak
切る（きる）: to cut
I go to school by bicycle
I speak in Japanese
I cut vegetables with a knife
個数などの単位 the amount
The で(de) particle can be used when you specify the amount of something.
For example, there are peaches that cost 500 yen for two of them, you can say この桃は2個で500円です. The grammar is as follows:
number+で(de)+complement or verb.
You can buy these two peaches with 500 yen.
Rent a room with four people.
Start a company with three people
時間/期間 a period of time
The で particle can be used for describing a period of time. For example, you can say summer vacation will end three days later: あと3日で夏休みが終わる.
The boundary partitions a term in time like the picture as follows. The red line is the time of the action.
time or period+で(de)+verb.
Summer vacation will end in three days.
The class will end at 5.
Some people confuse で and に because you can say both 5時で終わる and 5時に終わる. (It will end at 5 o’ clock.)
The difference is that で expresses a time span. For example, your class starts at 3 o’ clock and ends at 5 o’ clock. You can use 5時で終わる because you are thinking of the time span of the class.
に expresses a point in time. You are not thinking of a time span, but rather a single point in time.
○いちばんやさしい日本語教育入門 by 今井新悟
Easiest Introductory Japanese Teacher's manual by Shingo Imai, published in 2019