Psozot!
3.142*Dia.*Length*thickness*7843 will give you weight of pipe in Kgs provided you put the values of Diameter, length and thickness in meters. 7843 Kg/Cu.M is the density of steel.
As for cost you cannot apply any thumb rule, atleast that is what I feel.
Regards,
Truth: Even the hardest of the problems will have atleast one simple solution. Mine may not be one.