The printing time can be estimated by the 3D softwares called « Slicers » such as CURA, Slic3r, Kissslicer, etc… The estimation mainly depends on several parameters:
The size of the object to print
The size of the hot end nozzle
The height of each printed layers
The thickness of the shell
The infill percentage
The different spees used : infill, inside shell, outside shell, movement speed etc…
The print estimation is also taking into account some hidden parameters such as accelerations on the 3 axes X, Y and Z. THose parameters are often hard coded and cannot be changed on slicers. Often you can take between 10 and 20% of error margin for the slicer estimation. The real print time is more likely to be slower than the estimation. During a print you can also help yourself with the process percentage on the LCD scree and in this way better estimate the remaining printing time..