it depends
It depends on how your topping lift is configured, but generally if it is anchored to the end of the boom it has to be long enough to run the length of the luff to a turning block on the mast top, then down the length of the mast to either a turning block at the base of the mast (or cleat), or if you are running it back to the cockpit, the length from the base of the mast to the cleat plus enough for a tail. If the anchor end at the aft end of the boom has a snap shackle then you will need an adequate amount to create an eye splice or knot, whichever you prefer to use. A good way to measure for a topping lift is to use the main halyard as a measuring substitute, then using a messenger line bring down the main to do the actual measurement. Another way is to measure the sum of the luff and leech of you main, then add the amount of length from the mast base to the cleat plus a tail. Any braided dacron line of adequate size should be available for a quality marine or hardware store.