Medieval Times are 1,000 years in length. During this time technology changed, which is one reason why at the beginning of this age you had metal works being very expensive, and most people wearing padded clothing for armor (Gambeson) , to what we now call a Full Plate Armor. Similarly with weapons.
During 5th Century Swords were not a weapon that majority of people could get, while at the end of the Medieval age (around 16th Century) pretty much anybody could afford one.
How long does it make a sword? Even that varies. A cheap sword could take a day or two to make, while a master worked Pattern Welded sword could take a week or more to make. In addition to just the blade itself, a true work of art weapon would have expensive pommel made with a work of art scabbard which combine could take a month or even longer at times.
Consider this example of weapon:
These kinds of swords would take very long time to make, would take a real master, and would be well above a commoner means to purchase.
These swords were actually of good quality or they wouldn’t have survived, but these were warrior swords and meant for war and not status symbols so that gives you an idea.
To summarize, depended on which time period, which location, and the means of the buyer, the sword could range from being exceptionally expensive to cheap, second hand item that every soldier (or even every common in some instances) could buy.
Compare this to modern times. Think about cars of the early 20th Century, vs cars today. At the dawn of the 20th century cars were toys to the rich, while at the end of the 20th century pretty much everybody can afford a car. However the rich can still have his Ferrari, while poor will be driving an old beat up GM POS.
Same with swords. In, let’s say 8th century swords were restricted to those people of means who could afford it. Your common man had a spear, maybe an axe, and a dagger. While by the 16th century every two bit mercenary had a sword, as they made great side arms.
In some times and places swords were a status symbol, that only nobility could get. While in other times everybody had an access to one.