Nanoindentation was used to measure the nanomechanical properties of four two-dimensional transition metal dichalcogenides (TMDs), namely molybdenum disulfide (MoS2), rhenium disulfide (ReS2), rhenium diselenide (ReSe2), and tungsten diselenide (WSe2), with very high tensile strengths comparable to graphene. These materials have potential applications for new electronic device applications, but their nanomechanical properties have not yet been well studied. For this purpose, an atomic force microscope (AFM) capable of measuring the elastic moduli of these two-dimensional nanomaterials through nanoindentation was used to generate force-distance curves for analysis. In this work, we developed a new Python code to analyze these force-distance curves, resulting in more accurate values of the reduced Young's modulus and stiffness of each of these nanomaterials as compared to existing data analysis software such as AtomicJ and MountainsSPIP. The values obtained using our code for reduced Young's modulus of MoS2, ReS2, ReSe2, and WSe2 were 140, 79, 37, and 38 GPa, respectively, with percent differences as summarized in Table 3. Among the samples, MoS2 has the highest values for its reduced Young's modulus and stiffness followed by, in order, ReS2, WSe2, and ReSe2. Our results were in better agreement with theoretical calculations in the literature than those obtained by the other two pieces of data analysis software.