taxi from town to airport is max 30 euro. mind you i always round up as can't be bothered with euro coins.
Is that during the day when there's lots of traffic, or at 5am when the streets are empty?
Just checked the
AENA webpage for BCN which quotes taxi prices to the centre as being up to 25Euros (or 18E from the Plaza España area) - night rate. So shouldn't go over 30.