Automatically work out max swap amount available

Almost every wallet I have used so far in crypto land, including MetaMask now, seems to have an issue whereby it can’t show the max “NET” amount available to swap or buy. So I end up having to manually tinker to try and get as much in as possible or I get fed up and just do a round number and end up with tiny residual balances of ETH etc. sitting around in my various wallets.

Introducing a way that a swap or purchase can be done, via an “All” or “Max” button that is inclusive of estimated fees to make full use of my balance, would be great. Rather than just getting the message that can’t do the transaction as not enough ETH for gas fees and having to back out of the swap and recalculating