Background. Magnesium sulfate has analgesic properties during the postoperative period. However, there is a knowledge gap in pharmacology related to the use of the real, ideal, or corrected ideal body weight to calculate its dose in obese patients. This trial compared postoperative analgesia using actual and corrected ideal body weight. Methods. Seventy-five obese patients scheduled to undergo laparoscopic gastroplasty or cholecystectomy under general anesthesia were randomly assigned to three groups. The patients in the control group did not receive magnesium sulfate; the other two groups received magnesium sulfate at 40 mg·kg−1 of actual body weight or corrected ideal body weight. Results. In patients with body mass index >30 mg·kg−2 (mean body mass index ranging from 32.964 kg·m−2 to 33.985 kg·m−2, according to the groups) scheduled for video laparoscopic cholecystectomy, there were no differences in the blood magnesium concentrations in the groups receiving magnesium sulfate throughout the study, regardless of whether the strategy to calculate its dose was based on total or corrected ideal body weight. Patients in the groups receiving magnesium sulfate showed a significant reduction in morphine consumption (
p
≤
0.001
) and pain scores (
p
=
0.006
) in the postoperative period compared to those in the control group. There were no significant differences in morphine consumption (
p
=
0.323
) or pain scores (
p
=
0.082
) between the two groups receiving magnesium sulfate. There were no differences in the total duration of neuromuscular block induced by cisatracurium among the three groups (
p
=
0.181
). Conclusions. Magnesium sulfate decreased postoperative pain and morphine consumption without affecting the recovery time of cisatracurium in obese patients undergoing laparoscopic cholecystectomy. Strategies to calculate the dose based on the actual or corrected ideal body weight had similar outcomes related to analgesia and the resulting blood magnesium concentration. However, as the sample in this trial presented body mass indices ranging from 30.11 kg·m−2 to 47.11 kg/m−2, further studies are needed to confirm these findings in more obese patients, easily found in centers specialized.