An Easy Way to Approach "了"

Let’s take a look at this simple Chinese sentence to illustrate a commonly confused grammatical structure:
我干了半个小时。wǒ gàn le bàn gè xiǎo shí
I worked for half an hour.
“了” (le5) is one of the most common grammatical particles in Chinese, and in certain rare usages Chinese scholars are still debating about how to define it. In the case of the sentence above it is used to explain the completion of an action, and so it is placed after the verb. In the case of the first sentence, the half hour of work “干” has been completed, so we add “了”. Another way to think of this is to say that a change has occurred. Before, the work had not happened, but there was a change (so we add 了), and now it has. A lot of people mistakenly think that 了 simply refers to the past tense, and while many “changes” or “completed actions” happened in the past, thinking of it as the “past tense marker” is not accurate. Why? Because you might be speculating about the future, e.g. “In a half hour, I’ll be finished my work” 半个小时以后我的工作要办完了”. 了 here represents that in the future there will be a change is the work’s status from “not finished” to “finished”

So what makes it difference from the grammar particle “过” guò? Unlike “过”, “了” is not related to the general experience of the action, but rather a specific action at the time. Technically speaking, if you were to say “我干过半个小时”, that would be like saying “I’ve experienced working for half an hour before”. Because the speaker is not trying to emphasize that they’ve experienced working for a half hour at some point before in their personal history, but rather that they worked for a half hour, therefore “了” is the better way to express this.
So here’s the deal, when reading sentences and listening to people say “了”, ask yourself if you can see the change that has happened or is going to happen. There are other uses of 了 that don’t imply change, but this is by far the most common use.