The funeral officiant will make it very clear that the funeral service is over. They will invite the immediate family and close friends to leave the building first. Unlike at the end of a theater performance, people don't simply stand up and walk out. Instead, they wait for the rows in front of them to empty before stepping out into the aisle.
Guests and family may collect outside the location for some quiet conversation. If you are now ready to leave, do your best to say a sincere goodbye to the bereaved family.
If you choose to follow the hearse and casket to the cemetery or crematory, you'll be given clear directions by members of the funeral home staff.
If you choose to leave at this point in the funeral, make a quiet, discreet exit. Make a note to yourself to contact the bereaved family by phone in the next week or so. Offer them some time to for them to talk about their loss; and if you're willing, make a few suggestions about chores and other things you could do for them. Know that even if they decline your offer, they'll be delighted to know you're thinking of them enough to call.