Magnetotransport and superconducting properties are investigated for uniformly La-doped SrTiO 3 films and GdTiO 3 =SrTiO 3 heterostructures, respectively. GdTiO 3 =SrTiO 3 interfaces exhibit a highdensity 2D electron gas on the SrTiO 3 side of the interface, while, for the SrTiO 3 films, carriers are provided by the dopant atoms. Both types of samples exhibit ferromagnetism at low temperatures, as evidenced by a hysteresis in the magnetoresistance. For the uniformly doped SrTiO 3 films, the Curie temperature is found to increase with doping and to coexist with superconductivity for carrier concentrations on the high-density side of the superconducting dome. The Curie temperature of the GdTiO 3 =SrTiO 3 heterostructures scales with the thickness of the SrTiO 3 quantum well. The results are used to construct a stability diagram for the ferromagnetic and superconducting phases of SrTiO 3 .