The simultaneous determination of the depth of an embedded source and its radioactivity in the medium at the environmental surveys is a very useful and advisable method for an in-situ gamma-ray measurement with respect to the time and cost constraint. An algorithm for the determination of the source depth and its radioactivity in the medium was developed using the information on the uncollided photon fluences and measured net count rates, which mean not scattered fluences and background subtracted count rate, at the detector positions. Uncollided photon fluences were calculated at several source depths in the medium as well as at detector positions from the Monte Carlo N-Particle (MCNP) simulation. The results were then used to establish a database to output their values according to the source depth in the medium by inputting the photon energy and detector position from the medium. A simple program about the simultaneous determination of two variables was applied to the results on a task to find out the depth and activity of 134Cs and 137Cs at in-situ gamma-ray spectrometry. Less than 10% and 15% differences compared with the real values at the source depth and radioactivity, respectively, were achieved using the developed program.