Example mortgage payment

Sep 7, 2025 ยท 2 min read

This example represents a simple mortgage payment calculation using the internal expression node type.

Graph of mortgage payment

The internal expressions are python style expressions and can be of varying complexity, but this example just uses simple arithmetic.

Taking the mathematical expression for a mortgage payment, if we want to use the simple expression type, we would break these factors out into separate nodes and then connect them together.

As a graph we would visualise as follows:

We can represent these in nodlin using these expression nodes as follows.

On the right hand side node form, you will note the expression used to calculate the mortgage.

In nodlin, nodes can have an alias (or name) to make it easier in scripts and other expressions to reference. The aliases do not have to be globally unique, or even unique within a nodlin. The only rule is that they must be unique between the node, and its immediately connected nodes. This is similar to ’named’ cells in a spreadsheet so help clarity.

In the form for the expression, this alias is set in the ‘Name’ field on the form. There are other methods of accessing the values from related nodes in expressions but this is a simple example.

Like a spreadsheet, you can change any values in the graph (e,g, the loan term, annual rate of interest etc) and review the monthly payment.

Mortgage Excalidraw view

In the nodlin excalidraw view, you can select the pertinent nodes and add to the drawing. In some respects this is like ‘painting your own user interface’.

The key values in the calculation can be added to the drawing, and the users can change these values and see the result (the new mortgage payment) immediately.