The bulk of the second part was not included because it is very verbose, using basic math functions. Essentially the formulas use data that was copied into the post via the first block of code AND also data that was generated by the user and saved when the post was created. I just put those variables there as an example, but not referencing anything specific. All my data is stored across 100+ ACF fields in the post itself.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users