Provided is a method for designing a primer used for a polymerase chain reaction including: a local alignment step of obtaining a local alignment score by performing pairwise local alignment on a base sequence of a primer candidate under a condition that a partial sequence to be subjected to comparison includes the 3' terminal of the base sequence of the primer candidate; and a global alignment step of obtaining a global alignment score by performing pairwise global alignment on a base sequence which has a predetermined sequence length and includes the 3' terminal of the base sequence of the primer candidate and a primer set.