Based on the behavior of piled box or piled raft foundation, the mathmatical model is established for minimizing the cast of foundation. With an example, it is illustrated that optimum design method shows its superiority over traditional design method and obvious economic benefit.