This paper presents Carson model for estimating the sequence impedance of a transmission line according to the geometry of the tower and implemented in a Matlab script. The implementation of the model has been validated with results obtained from a transmission line presented in Anderson's book Analysis of Faulted Power of the IEEE PRESS Power Systems Engineering Series and can be applied for different geometries. The effects of ground return due to the guard cables and considering multiconductor by phase have been included in the model.