a couple thoughts came to mind.

the inner diameter of the sphere is the target diameter.
so i added twice the wall thickness to the diameter of the first sphere.

also, if a 25mm long neck is placed on top of a 2mm thick sphere
the effective length of the neck will be 27mm. so i tried
subtracting the wall thickness from neck length for the cylinder height.
seems functional.

also, aren't variables actually constants? sorta like constant variables...

// Example: A 220Hz

$fn=100; // fragment number

sd=132.48; // sphere diameter from formula
wt=2; // wall thickness
hd=25; // sound hole diameter
nl=25; // neck length

// Sphere

difference() {
sphere(d=sd+(2*wt)); // create sphere to be hollowed
sphere(d=sd); // hollow the sphere to diameter from formula
translate([0,0,-(sd/2)-wt])cylinder(d=hd,h=wt*2); // create sound hole
}

// Neck

difference() {
translate([0,0,-nl-(sd/2)+wt])cylinder(d=hd+(2*wt),h=nl-wt);
translate([0,0,-nl-(sd/2)+wt])cylinder(d=hd,h=nl-wt);
}