These are all really nothing more than convenient labels for different periods. 

Ancient history is roughly from the earliest recorded events (with BC--"Before Christ"-- or BCE--"Before Common Era" --and a descending numbering system--300 BC is before 200 BC-- until approximately the birth of Jesus Christ, after which the numbering of years in the West is sequential, followed with AD or CE in some cases, to distinguish years with the same number) to around the fifth century of the AD ("Year of the Lord") or CE ("Common Era"). 

The medieval period is usually considered to be from the sixth to about the sixteenth century, and from the seventeenth on is pretty much modern history. 
3 2 3