Brokers were not required to report basis on stock sales to the IRS until the early part of this decade. Therefore, many brokers either didn't save the amount or never knew the amount because you had purchased the stock through another broker. Under the old rules, the buyer (you) was responsible for keeping good records.
The IRS will accept your version of the basis, because that's all they have. Of course, when you calculate the basis, you should keep the calculations in your 2018 tax file in case this year is ever audited and the IRS becomes curious as to how you determined the basis.