The electroweak phase transition can be made first order by extending the Standard Model (SM) Higgs sector with extra scalars. The same new physics can explain the matter-antimatter asymmetry of the universe by supplying an extra source of CP violation and sphaleron processes. In this paper we study the existence of strong first order electroweak phase transition (SFOEWPT) in the type-I and type-II two Higgs doublet models (2HDM). We focus on how the SFOEWPT requirements constraint the spectrum of non-SM Higgs. Through the parameter space scan, we find that SFOEWPT suggests an upper limit on the masses of heavy Higgs $$ {m}_{A/H/{H}^{\pm }} $$
m
A
/
H
/
H
±
, which is around 1 TeV. High temperature expansion and Higgs vacuum uplifting is used for an analytical understanding of our results. After taking into account the probe ability on SFOEWPT from theoretical constraints, Higgs and Z-pole precision measurements up to the one-loop level at future Higgs & Z factories, sizeable loop corrections require $$ {m}_{A/{H}^{\pm }}-{m}_H $$
m
A
/
H
±
−
m
H
∈ (100, 250) GeV to meet SFOEWPT condition for Type-II 2HDM, and $$ \left|{m}_{A/{H}^{\pm }}-{m}_H\right| $$
m
A
/
H
±
−
m
H
∈ (100, 350) GeV or $$ \left|{m}_A-{m}_{H/{H}^{\pm }}\right| $$
m
A
−
m
H
/
H
±
∈ (100, 350) GeV for Type-I 2HDM.