There are two distances which are considered: Clerance and Creepage.
Clearance is measured over the air. Shortest line, over the air between two conductors.
Creepage is measured over the surface of insulator, like PCB.
In your case, unless you make some slots in PCB those are identical (solder mask is not considered, too easy to scratch).
Both values vary a lot depending on:
0) Voltage expected - 12 VDC comparing to 230 VAC.
1) Type of insulation - is it safety insulation (if it fail somebody might get electrocuted?)
2) Elevation (thin air in high mountains, like Tibet, 5 km over sea level, is easier to arc over)
3) Type of connection to mains voltage - closer to overhead line higher surges due to lighting strikes are expected. This is marked CAT II, CAT III, CAT IV
4) Pollution. If PCB will be hermetically sealed little creepage is needed comparing to something where dust lies or water condensation may happen.
5) Standards/application. Commercial audio amplifier vs Industrial PLC vs Medical equipment.