The following assumes that you've got a British passport.
If you're travelling within the EU your passport is valid right up until the very last second of its nominal validity.
Among other countries which are popular with British tourists, only a few place restrictions upon passport validities. To check the information for a particular country, find that country here
http://www.fco.gov.uk...el-advice-by-country/
and look under 'Entry Requirements'.
As Redcrx indicates, you can renew your passport at any time. The unexpired period on your old passport (up to a maximum of 9 months) is added to the validity of your new passport:
http://www.direct.gov...ourpassport/DG_174096
Chris