This school year, students will learn about history, science and grammar. But the first lesson for any back-to-school season is financial.

Whether you’re a parent shopping for your child or a student buying for yourself, you don’t want to overspend on your school year prep. To help you avoid doing just that, we compiled a list of things you should and shouldn’t do while shopping.

Do: Set a budget

Decide how much you can realistically afford to spend on getting ready for the semester before you make a single school-related purchase. You don’t want to splurge for an expensive tablet and end up blowing your backpack budget.

If you think you won’t be able to keep yourself on track, download an app to monitor your spending for you. Mint (free for iOS and Android) helps users keep tabs on their day-to-day spending in all aspects of life, including back-to-school. The download even has an Apple Watch version that can recommend a personalized spending goal for you.

Don’t: Buy everything right now

According to a 2016 study of parents by Rubicon Project, more than one-third of all parents and nearly half of the parents of college freshmen have already started back-to-school shopping.

But when it comes to getting a great deal, they’re too early. Retailers start pushing school merchandise early in the summer with catchy slogans and flashy displays, but the products are likely to be full-price. It’s better to wait until inventory has been sitting on shelves for a while. Sales will swell in late August and early September.

Do: Shop sales tax holidays

One of the best times to purchase school supplies is during back-to-school sales tax holidays. Typically held in August, these are days when select school supplies are exempt from state sales tax. Dates vary by location, but if your state participates, you can save considerably on categories such as electronics and clothing.

In Missouri, for instance, shoppers can shop tax-free Aug. 5 through 7 on clothing (any article with a taxable value of $100 or less), personal computers (not to exceed $1,500) and graphing calculators (not to exceed $150), among other school-oriented items.

Visit the Sales Tax Institute for a full listing of 2016 state sales tax holidays, including the dates, details and maximum costs for your state.

Don’t: Do it alone

Checking off every item on your school supply list can be daunting, especially if you do it by yourself. Instead, get a lesson in teamwork by going in on school supply purchases with friends or family. Coordinate supplies by buying in bulk, then splitting the cost. Or synchronize schedules so you can share textbooks — buy or rent half the number that you actually need, then switch off.

You can get help from classmates when it comes to clothing, too. Many schools host a uniform exchange event during back-to-school orientation. This affords a great opportunity to purchase gently used uniforms at discounted prices.

Do: Use student discounts

Besides sale shopping and deal hunting, other student-only discounts can come in handy. Take advantage of student discounts to get a certain percentage off your purchase of clothing, electronics and more. Most promotions require a valid student ID for redemption.

For clothing, students can save 15% on full-price, in-store purchases at Banana Republic. For electronics, college students can unlock special pricing at Best Buy or find discounted laptops, tablets and desktop computers at Lenovo.

Other places to look for discounts? Restaurants, movie theaters, music subscription services (like Spotify) and transportation. When in doubt, ask if a retailer has a student discount, even if it’s not explicitly advertised.

Don’t: Pay more than you have to

Before you head to the office supply store, consider less obvious places to shop. Your local drug store, grocery store and, yes, dollar store will be stocked with plenty of affordable school supplies.

And if you do take a trip to the office supply store, don’t pay the sticker price without first comparing your options. Price matching is a helpful option to ensure you’re not overpaying. At Staples, for instance, if you find a currently available lower price on a new, identical item, the store will match that price, with proof of the offer, plus discount it by 10% of the difference. This offer is valid through Sept. 17.

It’s easy to fall into the trap of spending more than you have to during school buying season. But if you know how and where to shop, you can start off the semester with cash to spare.