A nonlinear model is developed for an epidemic with contact tracing, and its dynamic is studied. A linear version of the model is presented in both deterministic and stochastic versions. We present the data for the cuban HIV/AIDS epidemic and fit the linear model to the data, we obtain estimates for the size of the Cuban HIV epidemic.