I highly recommend reading Jonathan Stark’s material on this topic. It changed the way I think about billing for software projects and advisory work.
His book “Hourly Billing is Nuts” is particularly good: https://jonathanstark.com/hbin
His book “Hourly Billing is Nuts” is particularly good: https://jonathanstark.com/hbin