The millionaire's surtax is doing most of the damage here.
Massachusetts taxes most capital gains at a flat 5.00%, but income above $1 million picks up an additional 4% surtax, which is where the combined 32.8% figure comes from (20% federal + 3.8% NIIT + 9.00% state, assuming the surtax applies).
Whether an investor lands at 32.8% or something lower depends on whether the surtax kicks in. Here's the full stack assuming it does; the capital gains tax calculator can model a specific sale, including depreciation recapture, either way.
A 1031 exchange defers all of it, surtax included, by moving the sale proceeds into a replacement property rather than a cash payout. Model the swap in the 1031 exchange calculator and check your 45-day and 180-day windows in the timeline calculator.