There are a lot out there that calculate calcium and alkalinity balance, here is the quick table though:
dKH- Alkalinity mEq/l- Balanced Ca
4.50 1.61 393
4.75 1.70 395
5.00 1.79 397
5.25 1.88 398
5.50 1.96 400
5.75 2.05 402
6.00 2.14 404
6.25 2.23 405
6.50 2.32 407
6.75 2.41 409
7.00 2.50 411
7.25 2.59 413
7.50 2.68 414
8.00 2.86 418
8.25 2.95 420
8.50 3.04 422
8.75 3.13 423
9.00 3.21 425
9.25 3.30 427
9.50 3.39 429
9.75 3.48 431
10.00 3.57 432
10.25 3.66 434
10.50 3.75 436
10.75 3.84 438
11.00 3.93 439
Magnesium in reef water should be targeted to 1280 ppm. Higher is fine as long as the other two are in balance. If they aren't in balance, the higher the magnesium level goes, and in the presence of growth accelerators like carbon and amino acids, the more likely the calcite crystals will form. Calcite is clear and when mixed with aragonite creates coral skeleton without the strength of aragonite alone.