The wired ones are good enough. How accurate do you need it? Back when I used one it repeatedly gave me the same distance for my commuting route (scientifically this property is called precision). Checking by other measures (e.g., car odometer) it might only differ by a few tenth's of a mile over a 50 mile course so I would say it is accurate to boot.
The wireless ones can get confused under high-power lines. A newer type are GPS units (and expensive). Don't know how accurate they are.
For the 2 former types there will be a tire size chart included in the instructions. The chart will give you a 'factor' to use when you set up the computer that allows it to know how far each revolution of the tire is. I've always used that factor as is from the chart.
For those who are really anal retentive you inflate the tires to riding pressure, get on the bike and have a friend chalk mark the tire and ground where they meet, then have your friend push you in a straight line one more complete revolutions of the wheel. You then can use this distance to derive your "personal" factor.