Well…. you could use the correct Field in the $_POST, which would be $_POST[‘post_id’], not $_POST[‘post-id’] 😉
Replace
update_post_meta($_POST['post-id'], 'whole_avg',$whole_avg);
with
update_post_meta($_POST['post_id'], 'whole_avg',$whole_avg);
etc.
😉 Happy Coding,
Kuchenundkakao