This paper develops a valuation model for fixed-rate mortgages, mortgage pools, and residential mortgage-backed securities (RMBS's) using an intensity-based approach. This model incorporates full prepayment, partial prepayment, and default in valuing a mortgage. Full prepayment is further classified into “refinancing” and “sale of a house” depending on the reason. The time of occurrence of each of these three types of prepayment and default is modeled as the first jump time of a Cox process. Under these conditions, the valuation formula for a mortgage as well as a partial differential equation (PDE) that the mortgage value satisfies is provided. As for implementation of the model, the short-term riskless interest rate and the house price are adopted as state variables. Each intensity process is specified in a manner that allows a jump in intensity depending on the state variables and the borrower's incentive for prepayment or default. Through such specifications, it is shown that our model has characteristics similar to some structural models in previous literature. As for the numerical method for valuation, we propose a simple backward induction technique on a tree instead of the commonly used Monte Carlo method. Additionally, the method for estimating the model is discussed, and the results of numerical simulations are reported.