To properly diagnose a fuel gauge, you disconnect the wire at the tank unit from the dash gauge and connect it to a rheostat. As you vary the resistance with the rheostat the dash gauge will read from full with an open circuit to empty with the required resistance. If you know the specified resistance for different readings on the dash gauge you can determine that everything in the gauge system is operating properly except the tank unit. So if you have an inaccurate gauge and everything else checks out, you have a bad tank unit.
Usually, but not always, the dash gauge and wiring are OK if the gauge reads full with the wire at the tank unit disconnected, and empty with it grounded.
Gerald