Hi,
It is probably the fuel gauge in the float arrangement in the tank. Without doing repairs, it is perhaps best to fill your tank with petrol and then when your fuel tank registers about 5gls, refill the tank again - but record the mileage reading at fill up and again when you refill at 5gls and then you will know roughly how far you can drive, in between fill ups. Take 2nd fill up mileage reading from first mileage reading = ?
Perhaps you should take your car to an auto electrician and have him check out the electrics to make sure that your fuel tank gauge problem can't be easily fixed externally. Although I have not changed the gauge on a Volvo and don't know how, I have done it on other cars and it is a horrible job and you can expect a soaking in petrol, when you take the plug out of the petrol tank - so don't be smoking or have a lighted flame anywhere nearby and wet petrol burns (burning sensation on the skin - like a nettle sting), apart from the stink, so don't get it in your eyes.
Personally, I'd leave repair or replacement of a fuel gauge in tank to a mechanic, if that is what it proves to be, because whatever it costs you to get the job gone, is more than compensated by the discomfort you will suffer, if you do it yourself.
BigBenn