Gates belt drive: installing larger front sprocket
On Gates' site there's a free spreadsheet called Gates Drive Calculator  that you can use to determine your belt length needed. It's  a weird tool in that instead of plugging in your desired gears and chainstay length, and minimum/maximum adjustment range and outputting what belt length you need, which would have been the smart or at least more intuitive way to do it, it makes you plug in your gears, then plug in a given belt length, and it outputs the resultant center-to-center dimension, minimum installation center-to-center, and minimum center-to-center for tensioning, which you then check whether it's in your adjustment range, and you have to repeat until you find a belt that fits.

Gates lists the pitch for their belts as 11mm and wants you to have an adjustment range of X-10 on the slack end and X+2 on the tight end, where X is the calculated center-to-center. So you could alter a magic gear calculator spreadsheet by replacing the 12.7s with 11s and that would be another way of figuring it out barring the Gates tool.

CDN and CDX belts have the same form factor and only differ in construction and materials. According to Gates they're cross-compatible.