Most likely cause of fuel gauge being inaccurate?

Has the fuel gauge sending unit been replaced recently with an aftermarket one? Do a search here and you will find numerous discussions on that topic with opinions on good vs. bad ones, as well as interesting methods to calibrate one by adding in additional resistors. I'm equally interested because it looks like I'm about to have to change one out soon.