Mass estimation in light-duty vehicles (LDVs) is a crucial aspect of vehicle dynamics, control systems, energy optimization, range prediction, and overall performance. Accurate mass estimation is essential for precise energy predictions, which are used by energy optimization algorithms. It also enhances vehicle safety and the effectiveness of advanced driver assistance systems (ADAS). The mass of a vehicle can vary depending on occupancy and load. This paper presents a comprehensive study on in-situ mass learning in light-duty vehicles under real-world driving conditions. Utilizing simple longitudinal dynamics, road grade calculated from GPS with RTK correction, and the vehicle’s torque model, we developed a robust framework for vehicle mass estimation. A detailed sensitivity analysis was performed to evaluate the impact of uncertainties or errors in various inputs and parameters, identifying optimal regions for learning the mass and ensuring the model's reliability. This method was successfully implemented in both a Plug-in Hybrid Electric minivan (Chrysler Pacifica) and a fully electric compact car (Chevrolet Bolt), each with SAE L4 automation capability, achieving error levels within 2% when compared to the actual mass measured on scales. The algorithm learns the mass in real-world driving scenarios without disrupting passengers and converges quickly within a few minutes of driving from the parking lot. It is designed to run dynamically whenever an opportunity arises to learn the vehicle's mass. The algorithm was validated for different sets of masses and consistently learned the vehicle mass within the target error of 2%. To test the repeatability of the results, thirty mass learning tests were performed for a given mass, yielding consistent results. This method is also extensible to conventional vehicles equipped with GPS sensors.