A warranty is more on written document. In case you will encounter a problem, for instance, a laptop you can present the warranty for them to correct any setback within the scope of the warranty. Guarantee on the other and, is more of giving their word, like if when the distributor of medicine tells you that Omeprazole is one of the most effective remedy for heartburn or acid reflux.
Dictionaries treat these two words as synonyms. However, in market parlance, there is a subtle difference. Guarantee refers to the performance postsale . It means that the manufacturer stands behind the product like a guarantor to a loan. It is a formal promise, like a contract, that if the performance is below par, the goods will be repaired or replaced or the money refunded.