In this work, the effect of AC-Stark shift of atomic energy levels in an optical dipole trap (ODT) on in situ absorption imaging of the trapped atoms has been investigated. The Stark shift of various energy levels of 87Rb atoms relevant for trapping in the optical dipole trap (ODT) has been calculated. The spatially varying AC-Stark shift of energy levels due to ODT beam results in position dependent absorption cross-section of the atom at the absorption probe laser wavelength, which significantly modifies the measured optical density (OD) of the trapped atom cloud during the in situ absorption imaging. We have estimated the number of atoms trapped in the ODT taking AC-Stark shift into account. The estimated numbers are found to be higher at higher ODT beam power, making a qualitative agreement with larger trap depth at higher ODT beam power. This work can be particularly useful in estimating the in situ loss rate of atoms from the trap during the evaporative cooling of the trapped atom cloud.