The Linux Foundation has calculated the total cost of developing a Linux Distro. They used Fedora 9 as their basis. The total cost estimated to be 10.8 billion dollars. With 1.4 of that developing the kernel alone. They came to this figure through calculating based on the number of lines of code and the average salary of a software developer. It has estimated that to develop from scratch it would take 24 years. There are more interesting stats in the Whitepaper.