Calculate values from two fields to a third field (when the form is in edit mode)

How can I calculate values ​​from two fields and display them in a third field, when I’m editing the form?