The primary objective of this study is to quantitatively establish the correlation between polystyrene thin film thickness and both molecular weight and solution concentration through advanced experimental analysis techniques. This paper pioneers a novel approach by employing a Python-based curve-fit machine learning model, offering accurate predictions of thin film thickness based on input molecular weight and concentration. This approach, encompassing both experimental and computational aspects, is the first of its kind in this field. The ability to accurately predict thickness of spin coated polystyrene films given molecular weight and concentration allows one to modify concentration to generate a desired film thickness with any available molecular weight of polystyrene, as well as determine the molecular weight of an unknown polystyrene by spin coating it at a known concentration and measuring thickness.