Are the wheels and tires the stock ones that came with the car or are they aftermarket and are they a different size than stock?
If you are going 60MPH and speedometer is reading 40 MPH then the wheel is spinning slower than the speedometer is calibrated for.
So, if the rims and tires are larger than stock the speedometer will read slower than true speed.
If this is not the case, then there may be an error with the speedometer or the computer.
Have the cars OBD test port scanned for trouble codes by a repair shop and see if anything comes back.
Then get back to us with the codes.