This paper proposed a mathematical model: Mixed Integer Non-Linear Programming to optimize the utilization of space in the container yard. The model developed was considering in two types of different blocks: exclusive block and sharing block. The exclusive block is a space in the container yard uniquely serving to the certain forwarder, otherwise it is classified as sharing block type. Base on this model, the maximum revenue is gained by reducing the loss of sales opportunity and considering fulfilment number of containers demand in each block in the container yard according to the capacity available. The mathematical model was applied to LINGO 11 software to obtain the optimal solution and its results are 14 sharing blocks and 9 exclusive blocks. The Total maximum profit is $ 29,816 per month. The proposed model was flexible enough to respond to changes in parameters related to future demand.