Public hospital owned by the government is responsible for providing good healthcare services to the community. In this case, the hospital must carry out its activities efficiently so that it can take advantage of the limited Indonesian government budget. With these financial constraints, planning and allocating efficient inpatient beds as an effort to save on hospital service costs is more challenging. One of the government-owned public hospital located in South Jakarta, Indonesia has not planned and allocated inpatient beds efficiently causing a high cost of inpatient bed provision. So, it is necessary for the hospital to plan and allocate inpatient beds properly. The inpatient care unit consists of adult, child, and obstetrics inpatient units. This research develops an optimization model using the Integer Linear Programming (ILP) method which aims to minimize the cost of providing beds in each inpatient unit. The results showed a reduction in the cost of providing beds with different numbers of beds allocated. Afterwards, the number of nurses needed was also calculated. The results also show a reduction in the number of nurses needed and it saves nurses' costs. The model shows that it can save the total cost up to IDR7,286,400.