The realtor commission is a selling expense used to reduce your gain only. It is not separately deductible.