I'm developing a software application in which users must enter odometer values of their cars. I'm looking for the correct term for the variable/database field that stores an odometer reading.

Terms I'm not really satisfied with:

  • mileage: Too imperial, since I'm actually storing kilometers and not miles. And this term is a bit ambiguous because it's also used for fuel efficiency.
  • distance: Too generic.
  • odometerValue: Too literal.

I'm looking for the metric (or unit independent) equivalent of the term mileage, or is this term also used in metric countries?

  • Mileage is used in metric countries as well, also in figurative uses (as in the popular Internet acronym YMMV = Your Mileage May Vary). – Janus Bahs Jacquet Feb 16 '14 at 10:04
  • 1
    As the Wikipedia article states, an odometer indicates distance. That being said, naming variables is off-topic here because as far as the English language is concerned you can name them anything you want. Distance is perfect, and so is odometerValue, which isn't even an English word. Mileage is only really used in the UK, elsewhere it refers to fuel consumption, as you say. But again, you can call that field absolutely anything you want. It is a variable nobody is ever going to see or care about. Name it Gronzhsk42 and be done. Or, you know, use source-code comments. – RegDwigнt Feb 16 '14 at 13:00
  • Imperial units have more or less embedded themselves into the language; and metric ones seem to be too latinate to really replace them in idiom. Of course, it wouldn't be the first time that measurement-language hasn't kept up with definitions or usage: when was the last time that the word 'mile' itself denoted a thousand of anything meaningful? – Niel de Beaudrap Feb 16 '14 at 13:49
  • Hope this isn't too late, but I thought you had it with "Odometer Reading" (odometerReading). – user3485388 Apr 28 '16 at 14:17

The word "distance" is perfectly acceptable. The reason it is generic is because the term "odometer" is also generic. If you need it to be less ambiguous you can use the term "distance traveled".

  • I think "kilometers travelled" would be better than "distance travelled" if you only ever get kilometers entered in the app. I was told many years ago that the best variable names were "honest, meaningful, and complete". – Henry Nov 2 '18 at 16:12

Not the answer you're looking for? Browse other questions tagged or ask your own question.