t = mg + ma solve for a
You said T = mg + maSubtract mg from each side: T - mg = maDivide each side by m : a = (T-mg) / m or a = T/m - g