2005 ford explorer 4.0L fuel problems

I have a 2005 ford explorer my gauge to the fuel shows a qtr but when i look at the computer it tell me empty what can be the problem? (Bad fuel pump?)

If it starts, the fuel pump is working.

Sounds like a fuel sensor problem. Figure out which one is correct and go with that. Or get an estimate

The fuel gauge sending unit may be bad.

Most likely a bad fuel quantity sensor.