Objectives: To evaluate the cost-effectiveness of repetitive transcranial magnetic stimulation (rTMS) and electroconvulsive therapy (ECT), and combining both treatments in a stepped care pathway for patients with treatment-resistant depression (TRD) in Ontario. Methods: A cost–utility analysis evaluated the lifetime costs and benefits to society of rTMS and ECT as first-line treatments for TRD using a Markov model, which simulates the costs and health benefits of patients over their lifetime. Health states included acute treatment, maintenance treatment, remission, and severe depression. Treatment efficacy and health utility data were extracted and synthesized from randomized controlled trials and meta-analyses evaluating these techniques. Direct costing data were obtained from national and provincial costing databases. Indirect costs were derived from government records. Scenario, threshold, and probabilistic sensitivity analyses were performed to test robustness of the results. Results: rTMS dominated ECT, as it was less costly and produced better health outcomes, measured in quality-adjusted life years (QALYs), in the base case scenario. rTMS patients gained an average of 0.96 additional QALYs (equivalent to approximately 1 year in perfect health) over their lifetime with costs that were $46,094 less than ECT. rTMS remained dominant in the majority of scenario and threshold analyses. However, results from scenarios in which the model’s maximum lifetime allowance of rTMS treatment courses was substantially limited, the dominance of rTMS over ECT was attenuated. The scenario that showed the highest QALY gain (1.19) and the greatest cost-savings ($46,614) was when rTMS nonresponders switched to ECT. Conclusion: From a societal perspective utilizing a lifetime horizon, rTMS is a cost-effective first-line treatment option for TRD relative to ECT, as it is less expensive and produces better health outcomes. The reduced side effect profile and greater patient acceptability of rTMS that allow it to be administered more times than ECT in a patient’s lifetime may contribute to its cost-effectiveness.