Instead of nested if functions use a case function. Instead of a calculation like this use a table of look up values in a related table--then you can update shipping charges by editing the records in the look up table instead of deciphering and modifying your calculation.
Air & Invoice ID = Invoice ID seems a strange calculation here. It would evaluate as true only if Air is an empty field.
If ( IsEmpty ( Air ) ; Case ( SubTotal < 20 ; 7.95 ;
Sub Total < 100 ; 10.95 ;
Sub Total < 500 ; 9.95 ;
Sub Total * 0.05
) // case
) // if
If this is a calculation field, this change will change the computed shipping charges for previously created invoices and thus produce invoices with incorrect totals.
Note: your current use of = makes no sense here, perhaps a typo when posting? Example: Subtotal = 100 and SubTotal = 499.99 will always be false.
As a table look up you can define a table with these values:
MinQty | CostExpression
500 "Sub Total * 0.05"
Define a relationship for the look up:
Invoices::Sub Total = ShippingRates::minQty
Define a text field, ShipCostExpression, and define it to look up the value of CostExpression and specify the "if no exact match, use next lower value" option.
To compute your shipping cost, use this calculation: Evaluate ( ShipCostExpression )