There is a wode range of opinions on this one. I'm not saying I have the one "right" answer, I'm just telling you what I do.
Just like at a restaurant, I base it on about 15%-20% of the fare. HOWEVER, I often round UP to the nearest $5, or at very least the nearest dollar.
Personally, I would never use coins in paying taxi fare. For example, if the fare was $12, then 15% would be $1.80. That total would be $13.80. I just wouldn't be caught dead giving the driver exactly $13.80. I might give $14 but generally speaking I'd give $15 and not think twice about it.
As I think more about it, I round up to the nearest $5 if the fare + tip would be more than half-way between $5 increments. In other words, if I calculated fare +tip to be $18, I'd usually just give the driver a $20 bill rather than dig for exactly $18 or ask for $2 change from a $20.
But that's just me.