The statement was prompted by a 20,000-strong petition demanding re-nationalisation.
Labour MP Tony Benn, who presented the petition, later accused the government of being out of touch with public opinion.
A committee of MPs last month asked the government to consider partial or total re-nationalisation in a report that condemned Railtrack's record on maintenance as "woeful".
'No plans'
But Deputy Prime Minister John Prescott has flatly ruled this out, declaring that the government has "no plans" to bring back Railtrack into public ownership.
He said: "To do so would probably take a couple of years and cost the taxpayer around £4bn at the current stock market valuation.
"None of this cost would be for rail investment - it would all go towards compensating shareholders."
Mr Prescott acknowledged that rail privatisation had caused "years of instability" by breaking up the railway into more than 100 separate companies.
But he said the government did not want to see "further years of upheaval" by attempting to restructure the industry again.
Responding to the petition's rejection, Tony Benn said: "It is obvious that an overwhelming majority of people would want to see Railtrack brought into public ownership".
The government's decision to rule out re-nationalisation was to "mistake public feeling on the matter."
Shadow transport minister Bernard Jenkin accused the government of failing to deliver investment and improvements in passenger services.
He said: "Unless Mr Prescott stops hammering Railtrack and lets it get on with the business of managing the railway, it will tumble dead into his lap."
Growing campaign
The campaign for re-nationalisation has been growing inside Parliament, and more than 100 Labour, Liberal Democrat and Plaid Cymru MPs have signalled their support by signing a Commons motion.
A recent BBC poll suggested that the public is in favour of re-nationalisation by a majority of three to one.