AbstractSunspots are important signatures of the global solar magnetic field cycle. It is believed that other stars also present these same phenomena. However, today it is not possible to observe directly star spots due to their very small sizes. The method applied here studies star spots by detecting small variations in the stellar light curve during a planetary transit. When the planet passes in front of its host star, there is a chance of it occulting, at least partially, a spot. This allows the determination of the spots physical characteristics, such as size, temperature, and location on the stellar surface. In the case of the Sun, there exists a relation between the magnetic field and the spot temperature. We estimate the magnetic field component along the line-of-sight and the intensity of sunspots using data from the MDI instrument on board of the SOHO satellite. Assuming that the same relation applies to other stars, we estimate spots magnetic fields of CoRoT-2 and Kepler-17 stars.