It's often difficult to know when your child's speech sound errors are typical or a cause for concern. For guidance, it's often helpful to determine how intelligible your child is overall to an unfamiliar listener. Moms, dads, grandmas and babysitters often become awfully good at interpreting a child's speech. But another adult, like a new teacher or parent of a playmate, may be able to help you determine if your child can be understood by others.By age 2, we would like a child to be 50% intelligible to someone who doesn't know them well. By age 3, your child should be 75% intelligible to an unfamiliar listener. And by age 4, your child should be 100% intelligible to someone who doesn't know them well. That's not to say they won't have a few speech sounds in error. And their intelligibility diminishes when tired and frustrated, upset, or very excited.
If your child is not meeting the marks listed above, I would be concerned that their inability to be understood by others may result in frustration, a withdrawal from communicative interactions, and may signal a larger problem with articulation or motor development. (And remember, a two-year-old should be combining words, and a three- or four-year-old should be speaking in phrases and sentences.)
In general, most of your child's speech sounds should be in place by age 4. There are a few more difficult sounds, such as "s" and "r" which can give your child problems for a couple more years, and are considered "developmentally appropriate" errors in their speech. However, in my experience, a child around age 4 becomes focused enough for some direct instruction in how to make their speech sounds correctly, so if you are concerned, I recommend consulting with a speech-language pathologist.