Retirement tax questions

I'm just asking for clarification. So we would end up paying $21K in taxes if we sell at $40K?