Quick answer
- Yes. A PDF form field can be set to calculate its own value from other fields, so a total updates the moment someone types a number.
- Acrobat's Calculate tab offers five ready made options: sum, product, average, minimum and maximum of the fields you pick.
- Anything else, like subtraction, a percentage or tax, needs a short formula, written with Simplified Field Notation or a line of JavaScript.
- PDF Forms builds the fields a calculation needs, but adding the calculation itself happens in the reader that opens the form.
How does a PDF form calculate a value?
A calculated field runs a small formula every time the form changes, using the values typed into other fields as its input.
- Each field has a Calculate setting, checked against every other field whenever one of them changes.
- The formula can be a predefined choice, like sum or average, or a custom script for anything more specific.
- The result appears straight away, before the form is saved or printed, so the person filling it in sees the right total.
- This only works in a reader that runs the form's scripts. A flattened or printed copy just shows the last number it had.
What can the built in options do?
Adobe Acrobat's Calculate tab gives five predefined calculations: sum, product, average, minimum and maximum, each picked from a list of other fields.
- Sum: adds the chosen fields, good for a column of prices or hours.
- Product: multiplies them, useful for a quantity times a unit price.
- Average, minimum, maximum: compare a group of numbers instead of combining them.
- There's no built in subtraction or division. For those, or for a percentage, a tax rate or rounding, you write a formula instead.
How do you write a custom calculation?
Simplified Field Notation lets you write a formula with field names and ordinary math symbols, without learning JavaScript.
- An expression like (Price*Quantity)*(1+TaxRate) reads almost like a spreadsheet formula.
- Field names stand in for whatever a person types into that field, and update the result as soon as they move to the next one.
- For logic a formula can't express, such as rounding to the nearest cent or switching between two rates, Acrobat's Calculate tab also accepts a custom JavaScript script.
- Behind the scenes, Simplified Field Notation is converted into that same JavaScript, so both paths end up running the same kind of script.
Why does a total show the wrong number?
Usually because the fields calculate in the wrong order, not because the formula itself is wrong.
- A reader works out each field's value in a set order, not by where it sits on the page.
- If a total is calculated before the fields that feed it, it shows last turn's number instead of the current one.
- Acrobat has a separate Set Field Calculation Order option that lets you move a total below its inputs.
- A field left set to text formatting instead of a number can also join digits together, like making 1 and 2 read as 12 instead of 3.
Can you build calculated fields in a free tool?
PDF Forms adds the text boxes, checkboxes and other fields a calculation needs, but it doesn't add the calculation script itself.
- Build the fields with PDF Forms, naming each one clearly, since a formula refers to fields by name.
- Open the saved form in Adobe Acrobat, or another editor with a Calculate tab, to set up the sum, formula or script.
- Other PDF editors, including Foxit and Qoppa's PDF Studio, offer the same kind of Calculate setting under their own form field properties.
- Once someone fills in the form and the totals look right, run Flatten PDF to lock the numbers in place before you file or share the copy.
- To collect a signature on the same form, once the numbers are final, use Sign PDF.
Try the tools
Try it on your own file. The tools are free and you don't need an account.
Common questions
Do calculated fields work on a phone or tablet?
Not always reliably. Some PDF readers on mobile don't run form scripts the same way desktop Acrobat does, so a total built from calculated fields can fail to update. Test the form on the devices people will actually use before you rely on it.
Will a calculated total still show up if I print the form?
Yes, as long as it was calculated before printing. The field shows whatever value it last worked out, since printing doesn't run any scripts of its own.
Can a checkbox or dropdown feed into a calculation?
Yes. Give the checkbox or dropdown a numeric export value, like 10 or 25, and a calculated field can include that value the same way it uses a typed number.
Is this the same as Adobe Acrobat Sign's calculated fields?
No. Acrobat Sign has its own calculated fields for e-signature forms, built into its paid business plans. The Calculate tab described here is a feature of the PDF file itself and works in ordinary PDF readers.
Does a calculation change the saved PDF file size much?
No. The formula or script is a few lines of text stored with the field, so it adds a tiny amount to the file compared with the images or fonts already in it.
Sources
- Adobe Acrobat PDF forms help helpx.adobe.com ·
- Create a calculated field in Acrobat Sign helpx.adobe.com ·
- Acrobat PDF form preferences helpx.adobe.com ·
This post is general information about working with PDFs, not legal or security advice. Check anything important with someone qualified. Posts are written with AI help, based on how our tools actually work. About VelloDoc