- Revit How-To
- Families & Content
How to Use Formulas in Revit Family Parameters
Eight steps in Revit, or one sentence in Mira.
Do it with MiraIn the Family Editor, click Create tab › Properties panel › Family Types. In the Formula column next to a parameter, type an expression with exact parameter names, such as Width + 2". Click Apply to check. Formulas take arithmetic, if(), rounding and trig.
Or, just ask Mira, a free add-in, to set formulas on parameters the family already has.
How to do it in Revit
Step 1: Open the family
Select a placed instance and click Edit Family, or open the .rfa with File tab › Open › Family. Family parameter formulas are set in the Family Editor; more in how to edit a family.
Step 2: Open Family Types
Click Create tab › Properties panel › Family Types. Each parameter shows its Value and Formula, and Search narrows a long list.
Step 3: Type the formula
Click the Formula cell next to the parameter and type the expression, such as Width + 2" for Rough Width. Parameter names are case sensitive, so Width works and width doesn't (Autodesk Help: Valid Formula Syntax and Abbreviations).
Step 4: Keep the units consistent
Both sides of + or - must be the same kind of unit, so add a length to a length. Give every constant its unit, such as 2" or 50 mm, or Revit guesses one for you (Autodesk Help: Troubleshooting: Formulas for Dimensions).
Step 5: Use if() for choices
Write if(condition, value if true, value if false), for example if(Width < 3', 2", 3"). Conditions use <, > and =, with and, or and not; Autodesk notes <= and >= aren't implemented, so write not(a > b) for a <= b (Autodesk Help: Use Conditional Statements in Formulas).
Step 6: Round to whole numbers
round(), roundup() and rounddown() need a unitless number. To round a length up to the next inch, divide by 1" and multiply back: roundup(Width / 1") * 1".
Step 7: Apply and flex
Click Apply to watch the geometry follow, then switch types or change the driving values to test it. A parameter whose formula uses two or more other parameters turns gray and changes only through them (Autodesk Help: Use Formulas for Numerical Parameters).
Step 8: Load it into the project
Click Create tab › Family Editor panel › Load into Project to update the project's copy. Save the .rfa too if the change should reach other projects.
What to watch for
Yes/No needs only the condition. For a Yes/No parameter, the condition is the whole formula: Lights > 1 turns it on when there's more than one light, with the true and false results implied.
Type parameters rarely need if(). A type already works like a condition: this type, this value. Autodesk suggests saving conditionals for instance parameters that don't vary continuously; to add sizes instead, see how to add a family type.
Text results need quotes. if() can return text, as in if(Length > 35', "Long", "Short"), but both results must be the same kind of value: two lengths, two Yes/No values or two strings.
Skip dashes in names. Autodesk recommends not using a dash in parameter names. In a formula, Rough-Width reads like Rough minus Width.
Older array formulas carry a workaround. Before Revit 2025, an array needed a count of 2 or more, so older families often add +1 or an if() to keep it there. From 2025, arrays flex to 1 or 0.
A fixed formula lives in one copy. Someone fixes a rough opening formula in one project's door, and the firm's .rfa and every other project keep the old one. Over time the same door carries different rough openings, and the schedules disagree. Revit family management keeps the approved version marked, so a fix made once reaches the next project.
Or, just ask Mira to do it.
Mira is an AI thinking partner for Revit that automates the work you repeat and builds tools your team needs.
- Type this in Mira
In this door family, set Rough Width to Width + 2" and Rough Height to Height + 1".
Open the door family in the Family Editor first. Mira lists the family's parameters, sets both formulas and reads them back, but Rough Width and Rough Height have to exist already, since Mira won't create parameters. It writes a small tool for the change, which asks Allow first.
How do you add a formula to a parameter in Revit?
How do I write an IF statement in a Revit formula?
Why does my Revit formula say inconsistent units?
Can you use greater than or equal to in Revit formulas?
Why is a parameter grayed out in Family Types?
Are Revit formulas case sensitive?
Related Revit how-tos
- How to Create a Family in RevitClick File tab › New › Family, pick a template such as Generic Model, and set Family Category and Parameters. Draw reference planes, label their dimensions as parameters, lock geometry to them, add sizes in Family Types, then save and Load into Project. Or, just describe a simple family and Mira builds it and places it in your model.
- How to Create and Change Wall Types in RevitSelect a wall, click Edit Type, then Duplicate, and name the new type. Click Edit next to Structure to set each layer's function, material and thickness. To change walls to the new type, select them and pick it in the Type Selector. Or, just ask Mira, a free add-in, to swap every wall of one type to another on a level.
- How to Edit a Family in RevitSelect a placed instance and click Edit Family, or right-click the family in the Project Browser and choose Edit. Make the change, then click Load into Project and choose whether to overwrite the existing version. Or, just ask Mira, a free add-in, to make a size change and say if it needs the Family Editor.
- How to Load a Family in RevitClick Insert tab › Load from Library panel › Load Family, browse to the .rfa file and click Open. Select several files to load them together. To update a family that's already in the project, right-click it in the Project Browser and choose Reload. Or, just ask Mira, a free add-in, to load the families in a folder you pick.
- How to Create a Corner Mullion in RevitDelete the two mullions where the curtain walls meet, click Architecture tab › Build panel › Mullion and pick an L, V, Trapezoid or Quad corner type. Click the corner grid line to place it. For your own size, duplicate a type. Or, just ask Mira, a free add-in, to list the curtain wall corners still missing one.
- How to Create and Use Type Catalogs in RevitA type catalog is a .txt file with the same name and folder as the family's .rfa. Its first row declares parameters as Name##type##units; each row after it is a type. On load, Revit lists the types so you pick only the ones you need. Or, just ask Mira, a free add-in, to add a type to a catalog.
Try it yourself.
Or bring it to the firm.
The download is free and takes a minute. The firm conversation is where your standards, your library, and your rollout get built. Start wherever makes sense.