Short-term memory (STM) has a limited capacity of 5-9 items that lasts up to 30 seconds, whereas long-term memory (LTM) has an unlimited capacity and can last a lifetime. STM encodes information acoustically based on sound, while LTM encodes semantically based on meaning. Studies have found recency and primacy effects in recall, with the first and last items on a list being best remembered. Research into encoding and duration provides evidence of differences between STM and LTM.