Except as provided in Section 27-10-17 and, unless the will otherwise provides, the tax shall be apportioned among all persons interested in the estate. The apportionment shall be made in the proportion that the value of the interest of each person interested in the estate bears to the total value of the interests of all persons interested in the estate. The values used in determining the tax shall be used for that purpose. If the decedent’s will directs a method of apportionment of tax different from the method described in this chapter, the method described in the will controls.