This is a video I made to teach 1323 students (and anyone who wants to learn) how to model gears in Solidworks.
Gear Outer Diameter formula = (Teeth# + 2) / Diametrical Pitch
Gear Pitch Diameter formula = Teeth# / Diametrical Pitch
Gear Center Distance formula = (Teeth#1 + Teeth#2) / 2*Diametrical Pitch
Gear Center Distance formula with center add = ((Teeth#1 + Teeth#2) / 2*Diametrical Pitch) + .002