You'll need a minimum of four hours to get off your arriving flight, go though immigration and customs, make your way into town, tour a bit and get back in time for your departing flight. On a recent (June 2009) layover it took me about an hour to get into Narita City from the time my plane touched down. But, I was lucky. I was one of the first off the plane. The immigration and customs lines were short and I arrived at the airport Keisei Line train station just a few minutes before a train departed for Narita City. It could take twice that long.