We have developed a method to determine the transient surface density and transient rate for any given survey, using Monte-Carlo simulations. This method allows us to determine the transient rate as a function of both the flux and the duration of the transients in the whole flux-duration plane rather than one or a few points as currently available methods do. It is applicable to every survey strategy that is monitoring the same part of the sky, regardless the instrument or wavelength of the survey, or the target sources. We have simulated both top-hat and Fast Rise Exponential Decay light curves, highlighting how the shape of the light curve might affect the detectability of transients. Another application for this method is to estimate the number of transients of a given kind that are expected to be detected by a survey, provided that their rate is known.