
199 Wis.2d 465 (1996)
544 N.W.2d 921
Michael W. BOOTH and Wendy L. Booth, Plaintiffs-Respondents,
v.
AMERICAN STATES INSURANCE COMPANY, a Foreign Corporation, Defendant-Appellant.
No. 95-1405.
Court of Appeals of Wisconsin.
Submitted on briefs December 12, 1995.
Decided January 25, 1996.
*468 For the defendant-appellant the cause was submitted on the briefs of Larry W. Barton of Nowlan & Mouat of Janesville.
For the plaintiffs-respondents the cause was submitted on the brief of Eugene R. Pigatti of Milwaukee.
Amicus Curiae brief was filed by Todd W. Schluesche of Ewald Law Offices, S.C. of Monroe.
Before Gartzke, P.J., Dykman and Vergeront, JJ.
VERGERONT, J.
American States Insurance Company (American States) appeals from a judgment denying its motion for costs and attorney fees under §§ 814.025 and 802.05, STATS. The trial court denied the motion on the ground that it was not filed prior to the *469 entry of judgment as required under our decision in Northwest Wholesale Lumber, Inc. v. Anderson, 191 Wis. 2d 278, 528 N.W.2d 502 (Ct. App. 1995). The issue on appeal is whether the trial court's decision and order granting American States' motion for summary judgment and dismissing the action filed by Michael and Wendy Booth is a judgment for purposes of §§ 814.025 and 802.05. We conclude the document is a judgment, and affirm.

BACKGROUND
The following facts are not disputed. The Booths filed their complaint against American States on February 11, 1993, alleging bad faith in processing a claim under a health insurance policy issued by American States. On March 28, 1994, American States filed a motion for summary judgment. The trial court granted American States' motion in a document titled "Decision on Defendant's Motion for Summary Judgment and Order." This was filed in the office of the clerk of court on June 17, 1994.
On July 28, 1994, American States filed a motion requesting costs and attorney fees under § 814.025, STATS.,[1] the "frivolous action" statute, and § 802.05(1)(a), STATS.,[2] which requires attorneys and *470 parties signing pleadings or other documents in an action to first determine that the documents are well grounded in fact and law.
[1]
Following an evidentiary hearing, the parties advised the trial court of our decision in Northwest Wholesale Lumber, Inc. v. Anderson, 191 Wis. 2d 278, 528 N.W.2d 502 (Ct. App. 1995). In Northwest Wholesale Lumber, we held that the language of § 814.025(1), STATS., providing that costs shall be awarded if the trial court makes a finding of frivolousness "during the proceedings or upon judgment," requires that a frivolousaction motion be filed before the trial court enters judgment in the case. Id. at 281, 528 N.W.2d at 504. We also held that, while § 802.05, STATS., is silent on the time within which motions must be filed under its terms, the statute embodies the same requirementthat the motion be filed prior to the entry of judgment. Id. at 281-82, 528 N.W.2d at 504. A judgment is entered when it is filed in the office of the clerk of court. Section 806.06(1)(b), STATS.
*471 The trial court determined that, while the document granting American States' motion for summary judgment was titled a decision and order, it was the final determination of the action and, therefore, a judgment. Citing Northwest Wholesale Lumber, the court then dismissed American States' motion for costs and attorney fees because the motion had not been filed prior to the entry of judgment on June 17, 1994.
[2]
The application of a statute to an undisputed set of facts presents an issue of law, which we review de novo. Tahtinen v. MSI Ins. Co., 122 Wis. 2d 158, 166, 361 N.W.2d 673, 677 (1985).

DISCUSSION
American States contends that its motion was not untimely because, while Northwest Wholesale Lumber holds that motions brought under §§ 814.025 and 802.05, STATS., must be filed prior to the entry of judgment, the trial court did not enter a judgment on its motion for summary judgment, but rather an order. According to American States, the term "judgment" contemplates a document titled a judgment. We disagree.
[3]
The trial court document is labeled a "Decision on Defendant's Motion for Summary Judgment and Order." However, whether a written direction of a trial court constitutes a judgment is not determined by the designation the trial court uses. State v. Donohue, 11 Wis. 2d 517, 520, 105 N.W.2d 844, 846 (1960). Rather, the test is the statutory definition set forth in § 806.01(1)(a), STATS. See id. (applying § 270.53, STATS., the predecessor to § 806.01(1)(a)).
*472 [4]
"A judgment is the determination of the action." Section 806.01(1)(a), STATS.[3] The trial court document grants summary judgment to American States, dismisses the Booths' action and awards American States $50 in costs under § 814.07, STATS.[4] This is a determination of the action and, therefore, a judgment. See, e.g., Fredrick v. City of Janesville, 92 Wis. 2d 685, 687, 285 N.W.2d 655, 656 (1979) (order granting defendants' motion to dismiss on the merits is a judgment because it determines the action); Collins v. Gee, 82 Wis. 2d 376, 381, 263 N.W.2d 158, 161 (1978) (order directing new trial on damages was not a judgment for purposes of §§ 895.04 and 270.53, STATS., 1973, because it did not finally determine the rights of the parties to the action); Committee to Retain Byers v. Elections Bd., 95 Wis. 2d 632, 633 n.1, 291 N.W.2d 616, 617 (Ct. App. 1980).
American States incorrectly relies on Kling v. Sommers, 252 Wis. 217, 31 N.W.2d 206 (1948), for the proposition that the determination of a motion is an order, not a judgment. In Kling, the trial court denied a motion to vacate the confirmation of a foreclosure sale *473 and to grant the defendant an enlarged time for redeeming his mortgaged premises from the foreclosure judgment. Our supreme court held that this determination was an order, not a judgment, because it was entered in a special proceeding instituted by a motion. The court stated that "all determinations entered in special proceedings are orders and not judgments by statutory definition." Id. at 220, 31 N.W.2d at 208.
In Donohue, the court explained that Kling did not hold that the determination of a motion is an order:
[I]t is contended that Kling v. Sommers, supra, lays down the rule that any court determination entered pursuant to a motion is an order and not a judgment. We do not consider that this was what was held in the Kling case. In that case the motion was one to set aside an order confirming sale in a mortgage-foreclosure action and the court determined that the instrument which denied the motion was an order and not a judgment. The rationale of such holding was that the matter determined was a special proceeding initiated by motion and not by summons or an original writ.
Donohue, 11 Wis. 2d at 522, 105 N.W.2d at 847.
[5]
Unlike in Kling, the summary judgment motion brought by American States was not a special proceeding initiated by motion. Moreover, at the time Kling and Donohue were decided, judgments and orders were separately defined by statute and different appeal time limits applied depending on whether the document appealed from was a judgment or an order.[5] The distinctions *474 between judgment and order for purposes of appeal are now largely nonexistent. Under § 808.03(1), STATS., an appeal as a matter of right can be taken from a final judgment or final order which disposes of the entire matter in litigation as to one or more of the parties, whether rendered in an action or special proceeding. Whether entered in an action or special proceeding, and whether labeled an order or judgment, the appealability of a document depends on whether it is final. See Fredrick, 92 Wis. 2d at 688, 285 N.W.2d at 657.
American States next argues that the trial court document is not a "judgment" within the meaning of §§ 814.025 and 802.05, STATS., because it does not include the statutory costs to which it is entitled. We disagree.
A judgment is perfected by the taxation of costs and the insertion of the amount thereof in the judgment. Section 806.06(1)(c), STATS. Under § 806.06(4), a judgment may be rendered and entered at the instance of any party either before or after perfection. If the party in whose favor the judgment is rendered causes it *475 to be entered, the party has thirty days from entry within which to tax costs. Id.
In Northwest Wholesale Lumber, we held that a motion for costs and attorney fees under §§ 814.025 and 802.05, STATS., must be filed prior to the entry of judgment, whether or not costs have yet been taxed at the time of entry. Northwest Wholesale Lumber, 191 Wis. 2d at 282, 528 N.W.2d at 504. We stated:
[Appellant] has not persuaded us that because general costs of the action allowable under § 814.04, STATS., . . . are taxed after judgment, we must construe the "upon judgment" language of § 814.025(1), STATS., as reaching beyond the entry of judgment. . . . [W]e do not believe the language chosen by the legislature permits such an interpretation.
Id. at 283 n.2, 528 N.W.2d at 504. See also Fredrick v. City of Janesville, 91 Wis. 2d 572, 576, 283 N.W.2d 480, 482 (Ct. App. 1979) (a judgment is final for appeal purposes whether or not costs have been taxed), rev'd on other grounds, 92 Wis. 2d 685, 285 N.W.2d 655 (1979).
[6]
Thus, even if the judgment in this case did not include all of the taxable costs to which American States was entitled, American States was still required to file its motion for costs and attorney fees prior to the entry of the judgment.
American States notes that in Northwest Wholesale Lumber, a memorandum decision in the plaintiff's favor was filed over two months prior to the entry of judgment and the memorandum decision was not considered the judgment for purposes of determining the timeliness of the motion brought under §§ 814.025 and 802.05, STATS. American States appears to argue that, *476 like the memorandum decision in Northwest Wholesale Lumber, the trial court document in this case is not a judgment.
The flaw in this argument is that there was no dispute in Northwest Wholesale Lumber regarding which document was the judgment for purposes of determining the timeliness of a motion under §§ 814.025 and 802.05, STATS. Rather, the dispute centered on whether "upon judgment" meant at or upon the time judgment is entered, or some later point. Since neither party suggested that the memorandum decision constituted the judgment, we did not discuss that issue.
Finally, American States argues that it is "often impossible" to decide whether or not to file a motion for costs and attorney fees until a motion for summary judgment has been decided, and that if we construe an order granting summary judgment as a judgment, parties will have no window of opportunity within which to file sanctions motions. According to American States, "counsel will be required to prematurely (and perhaps even routinely) include such motions in the initial pleadings even though there may be no then-existing basis to do so."
[7]
This argument is not persuasive. First, Northwest Wholesale Lumber holds only that a motion for costs and attorney fees under §§ 814.025 and 802.05, STATS., must be filed prior to the entry of judgment. It does not require that the motion be filed with the initial pleadings. A party may timely file a motion for costs and attorney fees after reading the opponent's pleadings, briefs, affidavits and other documents as long as the sanctions motion is filed prior to the entry of the judgment.
*477 [8]
Second, with respect to § 802.05, STATS., we made clear in Northwest Wholesale Lumber that prompt action in seeking sanctions on documents alleged to violate the statute is necessary. In discussing FED. R. CIV. P.11, after which § 802.05 was patterned, we cited with favor the following passage from a federal case:
If a party's action is "abusive" as contemplated by Rule 11, the adversary should be able to realize immediately that an offense has occurred. Seldom should it be necessary to wait for the district court or the court of appeals to rule on the merits of an underlying question of law. If there is doubt how the district court will rule on the challenged pleading or motion, the filing of the paper is unlikely to have violated Rule 11.

Northwest Wholesale Lumber, 191 Wis. 2d at 290, 528 N.W.2d at 507 (emphasis added) (citing Mary Ann Pensiero, Inc. v. Lingle, 847 F.2d 90, 99 (3d Cir. 1988)).
[9-11]
Third, with respect to § 814.025, STATS., an award of costs and fees under this statute does not depend upon the result of the litigation.[6] The purpose of the statute is to deter litigants and attorneys from commencing or continuing frivolous actions and to punish those who do so. Stoll v. Adriansen, 122 Wis. 2d 503, *478 511, 362 N.W.2d 182, 187 (Ct. App. 1984). Frivolousness is not determined by whether a party's position carries the day, but whether there is no reasonable basis for a claim or defense. In re Estate of Bilsie, 100 Wis. 2d 342, 350, 302 N.W.2d 508, 514 (Ct. App. 1981); cf. Northwest Wholesale Lumber, 191 Wis. 2d at 298, 528 N.W.2d at 510 (Sundby, J., dissenting).[7] The action to which American States objected was filed by the Booths on February 11, 1993. American States moved for summary judgment on March 28, 1994. It has not offered any explanation for why it had to wait until the trial court's decision on its motion for summary judgment to file a motion for costs and attorney fees.
By the Court.Judgment affirmed.
NOTES
[1]  Section 814.025(1), STATS., provides in relevant part:

If an action . . . commenced or continued by a plaintiff or a counterclaim, defense or cross complaint commenced, used or continued by a defendant is found, at any time during the proceedings or upon judgment, to be frivolous by the court, the court shall award to the successful party costs determined under s. 814.04 and reasonable attorney fees.
[2]  Section 802.05(1)(a), STATS., provides in relevant part:

The signature of an attorney or party constitutes a certificate that the attorney or party has read the pleading, motion or other paper; that to the best of the attorney's or party's knowledge, information and belief, formed after reasonable inquiry, the pleading, motion or other paper is well-grounded in fact and is warranted by existing law or a good faith argument for the extension, modification or reversal of existing law; and that the pleading, motion or other paper is not used for any improper purpose, such as to harass or to cause unnecessary delay or needless increase in the cost of litigation. . . . If the court determines that an attorney or party failed to read or make the determinations required under this subsection before signing any petition, motion or other paper, the court may, upon motion or upon its own initiative, impose an appropriate sanction on the person who signed the pleading, motion or other paper, or on a represented party, or on both. The sanction may include an order to pay to the other party the amount of reasonable expenses incurred by that party because of the filing of the pleading, motion or other paper, including reasonable attorney fees.
[3]  Section 806.01(1), STATS., provides in relevant part:

(a) A judgment is the determination of the action. It may be final or interlocutory.
(b) Each judgment shall specify the relief granted or other determination of the action, and the name and place of residence of each party to the action.
(c) Every final judgment shall grant the relief to which the party in whose favor it is rendered is entitled, even if the party has not demanded the relief in the pleadings. . . .
[4]  Section 814.07, STATS., provides: "Costs may be allowed on a motion, in the discretion of the court or judge, not exceeding $50, and may be absolute or directed to abide the event of the action."
[5]  At the time State v. Donohue, 11 Wis. 2d 517, 105 N.W.2d 844 (1960) was decided, a "judgment" was defined as "the final determination of the rights of the parties in the action," and an "order" was defined as "[e]very direction of a court or judge made or entered in writing and not included in a judgment." Section 270.53, STATS., 1959. To be appealable, an order had to be a final order affecting a substantial right made in a special proceeding or a final order affecting a substantial right which in effect determined the action and prevented a judgment from which an appeal could be taken. Section 274.33(1) and (2), STATS., 1959. The time limits for appeals from orders and judgments were also different. See §§ 274.04 and 274.01, STATS., 1959. Under current rules of civil procedure, "judgment" is defined as "the determination of the action." Section 806.01(1) (a), STATS. It may be final or interlocutory. Id. An "order" is no longer separately defined.
[6]  This is in contrast to a request for attorney fees under § 100.18, STATS., which is verdict-related, see Gorton v. American Cyanamid Co., 194 Wis. 2d 203, 230, 533 N.W.2d 746, 757 (1995), cert. denied,___ U.S. ___, 116 S. Ct. 753 (1996), and a request for attorney fees for representation in a ch. 227 review of a family-medical leave matter, which is outcome-related, see Richland Sch. Dist. v. DILHR, 166 Wis. 2d 262, 285-86, 479 N.W.2d 579, 589 (Ct. App. 1991), aff'd, 174 Wis. 2d 878, 498 N.W.2d 826 (1993).
[7]  As we stated in Northwest Wholesale Lumber, Inc. v. Anderson, 191 Wis. 2d 278, 528 N.W.2d 502 (Ct. App. 1995), while motions brought under §§ 814.025 and 802.05, STATS., must be filed prior to the entry of judgment, courts may, in their discretion, rule on the motion after judgment is entered. Id. at 286 n.5, 528 N.W.2d at 505.
