There’s a calculator at the link. Enter the number of teeth to suit the gear ratio and leave the Diamteric Pitch constant. The calculator will give you the Pitch Diameter to suit the number of teeth.
In order to have two gears properly mesh, they need to conform to certain requirements. You usually start with a ratio that you desire as the output and work backwards. For example, if you want a 2:1 ratio, then one gear needs a circumference that is twice the other. Perhaps a 1" diameter gear and a 2" diameter gear. If these are represented by circles, then they would look like:
To keep the teeth size comparable, the number of teeth on gear B needs to be twice the number on gear A. It’s generally not a good idea to use less than 8 teeth, so looking at 8 teeth on A: