Mistake and error mean something that is done incorrectly or wrong. Thus, they are synonyms. But the difference between these two words is in the context that they are used in.
Mistake和error意味着某事做的不正确或错误。因此,它们是同义词。但这两个词的区别在于它们所用的上下文。

1. Mistake is usually a choice that turns out to be wrong.
1.Mistake通常是一种错误的选择。

Mistakes are usually accidental. You know it’s wrong. In other words, mistakes are performance based, and can be self-corrected. Mistake is less formal than error, and is usually used in daily speech.
Mistakes通常是偶然的。你知道这是错误的。换句话说,mistakes是基于行为产生的,并且可以自我修正。mistake比error更不正式,通常在日常讲话中使用。

Coming to this place was a big mistake. We only wasted our time.
来到这个地方是个大错误。我们只是浪费了自己的时间。

2. Errors are usually made due to the lack of knowledge. So, the action was wrong because it was different from the rules, model or specific code. Error is a more formal word than mistake.
2.Errors通常是由于缺乏知识造成的。因此,该行为是错误的,因为它不同于规则、模型或特定代码。Error是比mistake更正式的词。

In sports, the violation of rules will be called an error.
在体育运动中,违反规则将被称为犯规。

You cannot say, “I does my homework” – that’s an error! You have to say, “I do my homework”.
你不能说,“I does my homework”—那是个错误!你必须说,“I do my homework”。