mid-14c., "to commit an offense;" late 14c., "to misunderstand, misinterpret, take in a wrong sense," from mis- (1) "badly, wrongly" + take (v.) or from a cognate Scandinavian source such as Old Norse mistaka "take in error, miscarry." Perhaps a blend of both words. The more literal sense of "take or choose erroneously" is from late 14c. Meaning "err in advice, opinion, or judgment" is from 1580s. Related: Mistook; mistaking.
"an error in action, opinion, or judgment," 1630s, from mistake (v.). The earlier noun was mistaking (c. 1300).
An error is a wandering from truth, primarily in impression, judgment, or calculation and, by extension of the idea, in conduct; it may be a state. A mistake is a false judgment or choice; it does not, as error sometimes does, imply moral obliquity, the defect being placed wholly in the wisdom of the actor, and in its treatment of this defect the word is altogether gentle. [Century Dictionary, 1897]
Meaning "unintended pregnancy" is from 1957. No mistake "no doubt" is by 1818.