It depends. If you have the materials on hand and you know how to make an extension cord, then it may be cheaper to make your own.  But purchasing a ready-made extension cord may be more affordable if you need to buy all the materials. So it really depends on your individual circumstances.