More than you'd expect and much older than you'd expect. Even with "total rewrites" and big refactors there are many modules that stay untouched. 

Péter suggest that for example you won't find old Netscape code in Firefox. Which is wrong, if you search through source code you'll find quite a few files with disclaimer like:

    * The Initial Developer of the Original Code is
    * Netscape Communications Corporation.
    * Portions created by the Initial Developer are Copyright (C) 1994-2000 

For example in Linux kernel headers you can find things like:

    include/linux/if_ppp.h: * Copyright (c) 1989 Carnegie Mellon University.
    include/linux/quota.h: * Copyright (c) 1982, 1986 Regents of the University of California. 
    include/linux/coda.h:          Copyright (c) 1987-1999 Carnegie Mellon University
    include/linux/mc146818rtc.h: * derived from Data Sheet, Copyright Motorola 1984 (!).
    include/net/slhc_vj.h: * Copyright (c) 1989 Regents of the University of California.