A taximeter or fare meter is a mechanical or electronic device installed in taxicabs and auto rickshaws that calculates passenger fares based on a combination of distance travelled and waiting time. Its shortened form, "taxi", is also a metonym for the hired cars that use them.

Taximeters, when they are installed to the taxis, require adjustment of k constant. During the movement, car generates signal which transmitted to the taximeter. Number of signals transmitted per k constant ratio results distance travelled. Within pre-installed tariff values and travel data are multiplied and fare is calculated.

More Info: en.wikipedia.org