You can put this solution on YOUR website! The surface area of a pipe is the circumference of the pipe times the length.
pi * diameter * length
.
If the pipe is a closed cylinder, then you would add the area of the cross-section * 2 (one for each end of the cylinder).
pi * diameter * length + 2*pi*radius^2
.
Done.