Environmental threats, such as habitat size reduction or environmental pollution, may not cause immediate extinction of a population but shorten the expected time to extinction. We develop a method to estimate the mean time to extinction for a density-dependent population with environmental fluctuation. We first derive a formula for a stochastic differential equation model (canonical model) of a population with logistic growth with environmental and demographic stochasticities. We then study an approximate maximum likelihood (AML) estimate of three parameters (intrinsic growth rater , carrying capacity K, and environmental stochasticity σ2e) from a time series of population size. The AML estimate of r has a significant bias, but by adopting the Monte Carlo method, we can remove the bias very effectively (bias-corrected estimate). We can also determine the confidence interval of the parameter based on the Monte Carlo method. If the length of the time series is moderately long (with 40--50 data points), parameter estimation with the Monte Carlo sampling bias correction has a relatively small variance. However, if the time series is short (less than or equal to 10 data points), the estimate has a large variance and is not reliable. If we know the intrinsic growth rater , however, the estimate of K and σ2e and the mean extinction timeT are reliable even if only a short time series is available. We illustrate the method using data for a freshwater fish, Japanese crucian carp (Carassius auratus subsp.) in Lake Biwa, in which the growth rate and environmental noise of crucian carp are estimated using fishery records.