You don't mention model and year of your bike! However if you shop on-line you should be able to find one for your bike, so you don't have to know it's length. The major brake line brands sell ready-made ones. If you look on Ebay for 'Goodridge Sportster brake line' you can buy a kit of line plus new banjo-bolts and copper washers. What more could a chap want?!
Look at Goodridge's website, also Barnett's, HEL, etc. There are several brands available. I live in the UK and can find plenty of 'em for your bike! The same brake line is used on models from 2008.