Neither UPS nor FedEx sells insurance in the strict sense. Both offer declared value, which raises the carrier's contractual liability limit up to a stated amount and prices that per $100. The rest of this site walks each schedule in detail; the point of comparison is below.
UPS declared value
$100 automatic per package. Above that, UPS charges per $100 of declared value with a minimum charge per package and a $50,000 ceiling on most packages. The full figures and the list of goods UPS refuses to over-declare are on our UPS declared value cost page, sourced to the UPS Tariff/Terms and Conditions of Service.
FedEx declared value
$100 automatic per package. FedEx charges $4.95 for the $100 to $300 band, then $1.65 per $100 above $300, on top of postage. Fourteen categories of goods (artwork, jewellery, glassware, collector items and instruments over 20 years old among them) are capped at $1,000 no matter what you declare. Detail on FedEx declared value from the FedEx Service Guide.
What both share
Both apply Signature Required automatically once declared value crosses a threshold, and both exclude many categories of goods from any coverage at all. The declared value figure buys a liability cap, not a guarantee - the carrier still needs to be at fault for the loss.