Calculate a field of a form, to get the total of an entry

how do i calculate the total of entries of a numeric field, using On-device storage
example a person submits the form 5x
and in this form it contains a field where it has a value of 1

return 5x1=5

I want to calculate all inputs of a specific field sent from the form,
what formula?
do I have to put these fields with the data sent from the form in repetitive form to be able to calculate, or can I do the calculations with a form normally and get all these results in one place?

I still consider this question as a duplicate of

What is the difference? Can you share a screenshot what do you try to achieve?