A washing machine includes a first housing, a second housing arranged above the first housing and having a laundry inlet arranged on the top, a first tub covered by the first housing and having a first opening on the front, a second tub covered by the second housing and having a second opening on the top, and a detergent container arranged in the second housing for storing a detergent to be supplied to the first tub.