This paper presents an analytical model for valuing interest rate swaps, subject to bilateral counterparty credit risk. The counterparty defaults are modeled by the reduced-form model as the first jump of a time-inhomogeneous Poisson process. All quantities modeled are market-observable. The closed-form solution gives us a better understanding of the impact of the credit asymmetry on swap value, credit value adjustment, swap rate and swap spread