AbstractAn interesting problem is to determine whether all the squares of side n−1 can be packed into a rectangle of the appropriate area. Such a packing (into a rectangle of the right area) is called perfect. In this paper, we define an algorithm based on an algorithm by Paulhus and use it to show that there is a perfect packing of the squares of side n−3/5 into a square. The technique can be used to prove that there is a perfect packing of the squares of side n−t into a square, where 1/2<t⩽3/5, provided a certain algorithm succeeds for that value of t. It has succeeded for every such value of t that the author has tried. We also show that there is a perfect packing for all t in the range 0.5964⩽t⩽0.6