If you just arrive in Spain maybe you are not familiar with the taxi fares. This problem is especially common in the airport area. There are some dishonest taxi drivers that have their taxi meter rigged so when you to your place that meter will count really fast. If you think that the taxi meter is rigged ask him to stop as fast as you can and get another taxi. If you don't do it you can end up paying double or triple the price. The price of a taxi can start at 2,50 to 4 euros and the price per kilometers goes from 1€ to 1,50€. So a 5km travel in barcelona should cost you less than 10 euro. 2,50 + (1.13 € * 5) and a little bit more if there is traffic.