how is brokerage calculated