Divorce is a trying time for anyone—especially when children are involved.

The separation process is long and filled with paperwork, especially when it comes to sorting out finances and budgeting for separate households. Experts advise parents strive to maintain their children’s lifestyle during and after the divorce to keep a sense of normalcy and planning a budget for potential custody or child support will help to make the split easier for all parties.

The problem in every divorce is that you have the same income but two households, says Randy Kessler, founding partner of Kessler & Solomiany. “Very few people make enough money to support a child the way they want to.” Lawyers and judges try to fix this problem by determining the minimum amount one parent can accept and the most the other can afford to pay for their children.

“Before you break up, become a better parent—take your kid to school, make them lunch,” says Kessler. Spending time with your kids as well as staying calm and saying nice things about the other parent, will help the custody case process.

Before heading into the legal process, work to create the custody outcome you want, recommends Kessler. If a judge has to make a decision about custody, he or she may keep the parents’ current arrangement. “If they share the child like they would in a divorce, they don’t have to pay a lawyer.”

Understand How Much your Child Costs

Maintaining a child’s lifestyle post-divorce requires parents to negotiate expenses and child support. “Every state has guidelines so a judge has a starting point for child support,” says Kessler. A judge will calculate child support and explain any deviation from the guidelines because of, for example, housing, extreme travel costs, medical needs or tuition for a child requiring extra training because of a learning disability.

Child support can be adjusted up or down after the divorce since a person’s income can change due to a raise or job loss. To avoid future trips back to court, Kessler suggests making payments a percentage of income.

To know how much you spend on your child, review 12 months of bank and credit card statements, says Tracy Stewart, certified public accountant and personal financial specialist in College Station, Texas. “Break down expenses for mom, dad and the children into categories like clothing, groceries, transportation and dining.” Also include summer camp and other activities. For categories like groceries that are shared by family members, figure out each person’s percentage of expenses. Adding up the numbers will help create a baseline for the money spent on your children in the last year.

It’s important to be clear about your expenses and that you’re able to live within a certain budget, says Suzanna de Baca, vice president of wealth strategies at Ameriprise Financial. “In general, the court will ask you for budgets or for you to provide records to help determine the amount of child support payments.”

While you review your child’s expenses, experts suggest examining your budget as a single parent. As a general rule, Jonathan Clements, director of Financial Education for Citibank, suggests keeping fixed costs like housing, utilities, food, insurance and property taxes at 50% of pre-tax income. The great litmus test is whether you can save on a regular basis—if you can’t, your expenses are too high and you’re probably spending too much on housing, says Clements. “You want to live within your income reasonably comfortable. Your finances will spiral out of control if everything is too tight.”

Experts suggest deciding whether you can spend the same amount of money on your children after the divorce. “If [child support] plus your income isn’t enough to maintain your child’s lifestyle, you’ll have to make tradeoffs for your child or yourself,” says de Baca.

Financially Protect Your Children

Consider insurance polices. The parent paying child support should have a life insurance policy, as well as disability insurance, recommends Stewart. The life insurance beneficiary should be the children or structure the policy such that the money is used to raise the children. Disability insurance will replace lost income if the person paying child support becomes disabled.

Negotiate medical costs. “You’ll want to look to the working parent to put the children on their health insurance,” says Stewart. Decide which parent will pay out-of-pocket expenses and how you’re going to pay and reimburse each other.

Prepare for the Future and Begin to Co-Parent 

You’ll have to make joint decisions for your children years after the divorce, says Stewart. In the future, they may have to discuss whether to send a child to summer camp of if a child can get a car, cell phone or tattoo. “You want the parents to be able to come to an agreement on these things in the future years. You cannot predict some expenses at the time of the divorce because you won’t know what can occur in the future.”

“Depending on the divorce situation, your spouse may not want to talk and the judge may decide on guideline support,” says Stewart. Parents who aren’t talking during the divorce may not talk after, which makes for uncomfortable parenting.

Although divorce is enormously upsetting, Clements doesn’t suggest funneling your emotions into the battle over finances—everybody ends up worse in this situation. “You want a reservoir of goodwill because you’ll need to ask your ex to watch the kids. If you have a nasty divorce, a flexible parenting agreement is likely to be impossible.”